2016-07-16 10:24:59 +08:00
|
|
|
# RUN: not llc -march=x86-64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
|
2015-08-07 02:26:36 +08:00
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
|
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:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$rdi' }
|
2015-08-14 07:10:16 +08:00
|
|
|
body: |
|
|
|
|
bb.0.entry:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $rdi
|
2015-08-14 07:10:16 +08:00
|
|
|
; CHECK: [[@LINE+1]]:50: duplicate 'volatile' memory operand flag
|
2021-05-20 10:25:51 +08:00
|
|
|
$eax = MOV32rm $rdi, 1, _, 0, _ :: (volatile volatile load (s32) from %ir.x)
|
2018-02-01 06:04:26 +08:00
|
|
|
$eax = INC32r killed $eax, implicit-def dead $eflags
|
2021-05-20 10:25:51 +08:00
|
|
|
MOV32mr killed $rdi, 1, _, 0, _, $eax :: (volatile store (s32) into %ir.x)
|
2021-11-07 23:06:54 +08:00
|
|
|
RET64 $eax
|
2015-08-07 02:26:36 +08:00
|
|
|
...
|