summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/MIR
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-08-06 18:26:36 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-08-06 18:26:36 +0000
commite86d51533d43a6d73692ddb16a061af263912ae5 (patch)
treebdb0a5557dd3ba1c198e4c86ccbd1bdb60ad1067 /llvm/test/CodeGen/MIR
parentec105872056880da9689cfffdb296e32ca1ba876 (diff)
downloadbcm5719-llvm-e86d51533d43a6d73692ddb16a061af263912ae5.tar.gz
bcm5719-llvm-e86d51533d43a6d73692ddb16a061af263912ae5.zip
MIR Parser: Report an error when parsing duplicate memory operand flags.
llvm-svn: 244240
Diffstat (limited to 'llvm/test/CodeGen/MIR')
-rw-r--r--llvm/test/CodeGen/MIR/X86/duplicate-memory-operand-flag.mir29
1 files changed, 29 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/MIR/X86/duplicate-memory-operand-flag.mir b/llvm/test/CodeGen/MIR/X86/duplicate-memory-operand-flag.mir
new file mode 100644
index 00000000000..f608195387f
--- /dev/null
+++ b/llvm/test/CodeGen/MIR/X86/duplicate-memory-operand-flag.mir
@@ -0,0 +1,29 @@
+# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
+
+--- |
+
+ define i32 @volatile_inc(i32* %x) {
+ entry:
+ %0 = load volatile i32, i32* %x
+ %1 = add i32 %0, 1
+ store volatile i32 %1, i32* %x
+ ret i32 %1
+ }
+
+...
+---
+name: volatile_inc
+tracksRegLiveness: true
+liveins:
+ - { reg: '%rdi' }
+body:
+ - id: 0
+ name: entry
+ liveins: [ '%rdi' ]
+ instructions:
+# CHECK: [[@LINE+1]]:55: duplicate 'volatile' memory operand flag
+ - '%eax = MOV32rm %rdi, 1, _, 0, _ :: (volatile volatile load 4 from %ir.x)'
+ - '%eax = INC32r killed %eax, implicit-def dead %eflags'
+ - 'MOV32mr killed %rdi, 1, _, 0, _, %eax :: (volatile store 4 into %ir.x)'
+ - 'RETQ %eax'
+...
OpenPOWER on IntegriCloud