mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
Add a regression test for folding spill code into scalar min and max.
llvm-svn: 38492
This commit is contained in:
parent
bd0ff28e1c
commit
5202c50198
20
test/CodeGen/X86/scalar-min-max-fill-operand.ll
Normal file
20
test/CodeGen/X86/scalar-min-max-fill-operand.ll
Normal file
@ -0,0 +1,20 @@
|
||||
; RUN: llvm-as < %s | llc -march=x86-64 | grep min | wc -l | grep 1
|
||||
; RUN: llvm-as < %s | llc -march=x86-64 | grep max | wc -l | grep 1
|
||||
; RUN: llvm-as < %s | llc -march=x86-64 | grep mov | wc -l | grep 2
|
||||
|
||||
declare float @bar()
|
||||
|
||||
define float @foo(float %a)
|
||||
{
|
||||
%s = call float @bar()
|
||||
%t = fcmp olt float %s, %a
|
||||
%u = select i1 %t, float %s, float %a
|
||||
ret float %u
|
||||
}
|
||||
define float @hem(float %a)
|
||||
{
|
||||
%s = call float @bar()
|
||||
%t = fcmp uge float %s, %a
|
||||
%u = select i1 %t, float %s, float %a
|
||||
ret float %u
|
||||
}
|
Loading…
Reference in New Issue
Block a user