Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 1 | ; Simple test of the store instruction. |
| 2 | |
Karl Schimpf | b6c96af | 2014-11-17 10:58:39 -0800 | [diff] [blame] | 3 | ; REQUIRES: allow_dump |
| 4 | |
Jim Stichnoth | bbca754 | 2015-02-11 16:08:31 -0800 | [diff] [blame] | 5 | ; RUN: %p2i -i %s --args --verbose inst -threads=0 | FileCheck %s |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 6 | |
| 7 | define void @store_i64(i32 %addr_arg) { |
| 8 | entry: |
Karl Schimpf | a667fb8 | 2014-05-19 14:56:51 -0700 | [diff] [blame] | 9 | %__1 = inttoptr i32 %addr_arg to i64* |
| 10 | store i64 1, i64* %__1, align 1 |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 11 | ret void |
| 12 | |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 13 | ; CHECK: Initial CFG |
Karl Schimpf | 5081c21 | 2014-09-26 09:17:21 -0700 | [diff] [blame] | 14 | ; CHECK: entry: |
| 15 | ; CHECK-NEXT: store i64 1, i64* %addr_arg, align 1 |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 16 | ; CHECK-NEXT: ret void |
| 17 | } |
| 18 | |
| 19 | define void @store_i32(i32 %addr_arg) { |
| 20 | entry: |
Karl Schimpf | a667fb8 | 2014-05-19 14:56:51 -0700 | [diff] [blame] | 21 | %__1 = inttoptr i32 %addr_arg to i32* |
| 22 | store i32 1, i32* %__1, align 1 |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 23 | ret void |
| 24 | |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 25 | ; CHECK: Initial CFG |
Karl Schimpf | 5081c21 | 2014-09-26 09:17:21 -0700 | [diff] [blame] | 26 | ; CHECK: entry: |
| 27 | ; CHECK-NEXT: store i32 1, i32* %addr_arg, align 1 |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 28 | ; CHECK-NEXT: ret void |
| 29 | } |
| 30 | |
| 31 | define void @store_i16(i32 %addr_arg) { |
| 32 | entry: |
Karl Schimpf | a667fb8 | 2014-05-19 14:56:51 -0700 | [diff] [blame] | 33 | %__1 = inttoptr i32 %addr_arg to i16* |
| 34 | store i16 1, i16* %__1, align 1 |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 35 | ret void |
| 36 | |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 37 | ; CHECK: Initial CFG |
Karl Schimpf | 5081c21 | 2014-09-26 09:17:21 -0700 | [diff] [blame] | 38 | ; CHECK: entry: |
| 39 | ; CHECK-NEXT: store i16 1, i16* %addr_arg, align 1 |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 40 | ; CHECK-NEXT: ret void |
| 41 | } |
| 42 | |
| 43 | define void @store_i8(i32 %addr_arg) { |
| 44 | entry: |
Karl Schimpf | a667fb8 | 2014-05-19 14:56:51 -0700 | [diff] [blame] | 45 | %__1 = inttoptr i32 %addr_arg to i8* |
| 46 | store i8 1, i8* %__1, align 1 |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 47 | ret void |
| 48 | |
Jim Stichnoth | 5bc2b1d | 2014-05-22 13:38:48 -0700 | [diff] [blame] | 49 | ; CHECK: Initial CFG |
Karl Schimpf | 5081c21 | 2014-09-26 09:17:21 -0700 | [diff] [blame] | 50 | ; CHECK: entry: |
| 51 | ; CHECK-NEXT: store i8 1, i8* %addr_arg, align 1 |
Jim Stichnoth | f7c9a14 | 2014-04-29 10:52:43 -0700 | [diff] [blame] | 52 | ; CHECK-NEXT: ret void |
| 53 | } |