linux-packaging-mono/external/llvm/test/CodeGen/X86/branchfolding-undef.mir
Xamarin Public Jenkins (auto-signing) f32dbaf0b2 Imported Upstream version 5.18.0.225
Former-commit-id: 10196d987d5fc5564b9d3b33b1fdf13190f4d0b5
2018-12-21 19:01:49 +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
...