PPCInstrInfo::optimizeCompareInstr should not optimize FP compares

The floating-point record forms on PPC don't set the condition register bits
based on a comparison with zero (like the integer record forms do), but rather
based on the exception status bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181423 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Hal Finkel
2013-05-08 12:16:14 +00:00
parent 3ea16db0be
commit b45eb9fd27
2 changed files with 13 additions and 20 deletions

View File

@@ -118,7 +118,7 @@ entry:
ret double %cond
; CHECK: @food
; CHECK: fsub. 0, 1, 2
; CHECK-NOT: fsub. 0, 1, 2
; CHECK: stfd 0, 0(5)
}
@@ -131,7 +131,7 @@ entry:
ret float %cond
; CHECK: @foof
; CHECK: fsubs. 0, 1, 2
; CHECK-NOT: fsubs. 0, 1, 2
; CHECK: stfs 0, 0(5)
}