Colin LeMahieu | b8575b1 | 2015-06-13 21:46:39 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon < %s | FileCheck %s |
Jyotsna Verma | a696239 | 2013-04-23 17:11:46 +0000 | [diff] [blame] | 2 | ; Check that we generate absolute addressing mode instructions |
| 3 | ; with immediate value. |
| 4 | |
| 5 | define i32 @f1(i32 %i) nounwind { |
Krzysztof Parzyszek | c9f797f | 2018-03-06 19:07:21 +0000 | [diff] [blame] | 6 | ; CHECK: memw(##786432) = r{{[0-9]+}} |
Jyotsna Verma | a696239 | 2013-04-23 17:11:46 +0000 | [diff] [blame] | 7 | entry: |
| 8 | store volatile i32 %i, i32* inttoptr (i32 786432 to i32*), align 262144 |
| 9 | ret i32 %i |
| 10 | } |
| 11 | |
| 12 | define i32* @f2(i32* nocapture %i) nounwind { |
| 13 | entry: |
Krzysztof Parzyszek | c9f797f | 2018-03-06 19:07:21 +0000 | [diff] [blame] | 14 | ; CHECK: r{{[0-9]+}} = memw(##786432) |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 15 | %0 = load volatile i32, i32* inttoptr (i32 786432 to i32*), align 262144 |
Jyotsna Verma | a696239 | 2013-04-23 17:11:46 +0000 | [diff] [blame] | 16 | %1 = inttoptr i32 %0 to i32* |
| 17 | ret i32* %1 |
| 18 | } |