InstCombine: fix a bug when combining (fcmp cc0 x, y) && (fcmp cc1 x, y).

uno && ueq was converted to ueq, it should be converted to uno.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158441 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren
2012-06-14 05:57:42 +00:00
parent ce5c6fb55f
commit 7a0575b9a8
3 changed files with 34 additions and 3 deletions

View File

@@ -66,3 +66,14 @@ define zeroext i8 @t6(float %x, float %y) nounwind {
; CHECK: t6
; CHECK: ret i8 0
}
define zeroext i8 @t7(float %x, float %y) nounwind {
%a = fcmp uno float %x, %y
%b = fcmp ult float %x, %y
%c = and i1 %a, %b
%retval = zext i1 %c to i8
ret i8 %retval
; CHECK: t7
; CHECK: fcmp uno
; CHECK-NOT: fcmp ult
}