| Ulrich Weigand | 9e3577f | 2013-05-06 16:17:29 +0000 | [diff] [blame] | 1 | ; Test the "S" asm constraint, which accepts addresses that have a base |
| 2 | ; and a 20-bit displacement. |
| 3 | ; |
| 4 | ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s |
| 5 | |
| 6 | define void @f1(i64 %base) { |
| Stephen Lin | d24ab20 | 2013-07-14 06:24:09 +0000 | [diff] [blame] | 7 | ; CHECK-LABEL: f1: |
| Ulrich Weigand | 9e3577f | 2013-05-06 16:17:29 +0000 | [diff] [blame] | 8 | ; CHECK: blah 0(%r2) |
| 9 | ; CHECK: br %r14 |
| 10 | %addr = inttoptr i64 %base to i64 * |
| 11 | call void asm "blah $0", "=*S" (i64 *%addr) |
| 12 | ret void |
| 13 | } |
| 14 | |
| 15 | ; FIXME: at the moment the precise constraint is not passed down to |
| 16 | ; target code, so we must conservatively treat "S" as "Q". |