Matthias Braun | 538859c | 2016-07-16 02:24:59 +0000 | [diff] [blame] | 1 | # RUN: not llc -march=x86-64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s |
Alex Lorenz | 7feaf7c | 2015-07-16 23:37:45 +0000 | [diff] [blame] | 2 | # This test ensures that an error is reported when an stack object reference |
| 3 | # uses a different name then the stack object definition. |
| 4 | |
| 5 | --- | |
| 6 | |
| 7 | define i32 @test(i32 %a) { |
| 8 | entry: |
| 9 | %b = alloca i32 |
| 10 | store i32 %a, i32* %b |
| 11 | %c = load i32, i32* %b |
| 12 | ret i32 %c |
| 13 | } |
| 14 | |
| 15 | ... |
| 16 | --- |
| 17 | name: test |
Alex Lorenz | 7feaf7c | 2015-07-16 23:37:45 +0000 | [diff] [blame] | 18 | tracksRegLiveness: true |
| 19 | registers: |
| 20 | - { id: 0, class: gr32 } |
| 21 | frameInfo: |
| 22 | maxAlignment: 4 |
| 23 | stack: |
| 24 | - { id: 0, name: b, size: 4, alignment: 4 } |
Alex Lorenz | 5022f6b | 2015-08-13 23:10:16 +0000 | [diff] [blame] | 25 | body: | |
| 26 | bb.0.entry: |
| 27 | %0 = COPY %edi |
| 28 | ; CHECK: [[@LINE+1]]:13: the name of the stack object '%stack.0' isn't 'x' |
| 29 | MOV32mr %stack.0.x, 1, _, 0, _, %0 |
| 30 | %eax = COPY %0 |
| 31 | RETQ %eax |
Alex Lorenz | 7feaf7c | 2015-07-16 23:37:45 +0000 | [diff] [blame] | 32 | ... |