llvm-mirror/test/CodeGen/X86/branchfolding-undef.mir
Puyan Lotfi d4c615be8c Followup on Proposal to move MIR physical register namespace to '$' sigil.
Discussed here:

http://lists.llvm.org/pipermail/llvm-dev/2018-January/120320.html

In preparation for adding support for named vregs we are changing the sigil for
physical registers in MIR to '$' from '%'. This will prevent name clashes of
named physical register with named vregs.

llvm-svn: 323922
2018-01-31 22:04:26 +00:00

29 lines
560 B
YAML

# RUN: llc -o - %s -mtriple=i686-- -run-pass branch-folder | FileCheck %s
# Test that tail merging drops undef flags that aren't present on all
# instructions to be merged.
--- |
define void @func() { ret void }
...
---
# CHECK-LABEL: name: func
# CHECK: bb.1:
# CHECK: $eax = MOV32ri 2
# CHECK-NOT: RET
# CHECK: bb.2:
# CHECK-NOT: RET 0, undef $eax
# CHECK: RET 0, $eax
name: func
tracksRegLiveness: true
body: |
bb.0:
JE_1 %bb.1, implicit undef $eflags
JMP_1 %bb.2
bb.1:
$eax = MOV32ri 2
RET 0, $eax
bb.2:
RET 0, undef $eax
...