mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
don't randomly miscompile seto/setuo just because we are in
ffastmath mode. This fixes rdar://5902801, a miscompilation of gcc.dg/builtins-8.c. Bill, please pull this into Tak. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
56b4f2bdf6
commit
6bf30ab347
@ -1272,8 +1272,8 @@ void SelectionDAGLowering::FindMergedConditions(Value *Cond,
|
||||
case FCmpInst::FCMP_OLT: FOC = ISD::SETLT; FPC = ISD::SETOLT; break;
|
||||
case FCmpInst::FCMP_OLE: FOC = ISD::SETLE; FPC = ISD::SETOLE; break;
|
||||
case FCmpInst::FCMP_ONE: FOC = ISD::SETNE; FPC = ISD::SETONE; break;
|
||||
case FCmpInst::FCMP_ORD: FOC = ISD::SETEQ; FPC = ISD::SETO; break;
|
||||
case FCmpInst::FCMP_UNO: FOC = ISD::SETNE; FPC = ISD::SETUO; break;
|
||||
case FCmpInst::FCMP_ORD: FOC = FPC = ISD::SETO; break;
|
||||
case FCmpInst::FCMP_UNO: FOC = FPC = ISD::SETUO; break;
|
||||
case FCmpInst::FCMP_UEQ: FOC = ISD::SETEQ; FPC = ISD::SETUEQ; break;
|
||||
case FCmpInst::FCMP_UGT: FOC = ISD::SETGT; FPC = ISD::SETUGT; break;
|
||||
case FCmpInst::FCMP_UGE: FOC = ISD::SETGE; FPC = ISD::SETUGE; break;
|
||||
@ -2317,8 +2317,8 @@ void SelectionDAGLowering::visitFCmp(User &I) {
|
||||
case FCmpInst::FCMP_OLT: FOC = ISD::SETLT; FPC = ISD::SETOLT; break;
|
||||
case FCmpInst::FCMP_OLE: FOC = ISD::SETLE; FPC = ISD::SETOLE; break;
|
||||
case FCmpInst::FCMP_ONE: FOC = ISD::SETNE; FPC = ISD::SETONE; break;
|
||||
case FCmpInst::FCMP_ORD: FOC = ISD::SETEQ; FPC = ISD::SETO; break;
|
||||
case FCmpInst::FCMP_UNO: FOC = ISD::SETNE; FPC = ISD::SETUO; break;
|
||||
case FCmpInst::FCMP_ORD: FOC = ISD::SETO; break;
|
||||
case FCmpInst::FCMP_UNO: FOC = ISD::SETUO; break;
|
||||
case FCmpInst::FCMP_UEQ: FOC = ISD::SETEQ; FPC = ISD::SETUEQ; break;
|
||||
case FCmpInst::FCMP_UGT: FOC = ISD::SETGT; FPC = ISD::SETUGT; break;
|
||||
case FCmpInst::FCMP_UGE: FOC = ISD::SETGE; FPC = ISD::SETUGE; break;
|
||||
|
15
test/CodeGen/X86/2008-05-01-InvalidOrdCompare.ll
Normal file
15
test/CodeGen/X86/2008-05-01-InvalidOrdCompare.ll
Normal file
@ -0,0 +1,15 @@
|
||||
; RUN: llvm-as < %s | llc -enable-unsafe-fp-math | grep jnp
|
||||
; rdar://5902801
|
||||
|
||||
declare void @test2()
|
||||
|
||||
define i32 @test(double %p) nounwind {
|
||||
%tmp5 = fcmp uno double %p, 0.000000e+00
|
||||
br i1 %tmp5, label %bb, label %UnifiedReturnBlock
|
||||
bb:
|
||||
call void @test2()
|
||||
ret i32 17
|
||||
UnifiedReturnBlock:
|
||||
ret i32 42
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user