mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
0b1305ba18
We assumed that flags were only present on binary operators. This is not true, they may also be present on calls and fcmps. llvm-svn: 267113
19 lines
435 B
LLVM
19 lines
435 B
LLVM
; RUN: opt -gvn -S < %s | FileCheck %s
|
|
|
|
declare void @use(i1)
|
|
|
|
define void @test1(float %x, float %y) {
|
|
entry:
|
|
%cmp1 = fcmp nnan oeq float %y, %x
|
|
%cmp2 = fcmp oeq float %x, %y
|
|
call void @use(i1 %cmp1)
|
|
call void @use(i1 %cmp2)
|
|
ret void
|
|
}
|
|
|
|
; CHECK-LABEL: define void @test1(
|
|
; CHECK: %[[cmp:.*]] = fcmp oeq float %y, %x
|
|
; CHECK-NEXT: call void @use(i1 %[[cmp]])
|
|
; CHECK-NEXT: call void @use(i1 %[[cmp]])
|
|
; CHECK-NEXT: ret void
|