1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/test/CodeGen/X86/testb-je-fusion.ll
Kyle Butt 6035a9f12a Revert "CodeGen: Allow small copyable blocks to "break" the CFG."
This reverts commit ada6595a526d71df04988eb0a4b4fe84df398ded.

This needs a simple probability check because there are some cases where it is
not profitable.

llvm-svn: 291695
2017-01-11 19:55:19 +00:00

21 lines
459 B
LLVM

; RUN: llc < %s -march=x86-64 -mcpu=corei7-avx | FileCheck %s
; testb should be scheduled right before je to enable macro-fusion.
; CHECK: testb $2, %{{[abcd]}}h
; CHECK-NEXT: je
define i32 @check_flag(i32 %flags, ...) nounwind {
entry:
%and = and i32 %flags, 512
%tobool = icmp eq i32 %and, 0
br i1 %tobool, label %if.end, label %if.then
if.then:
br label %if.end
if.end:
%hasflag = phi i32 [ 1, %if.then ], [ 0, %entry ]
ret i32 %hasflag
}