From a4b521598aff90b925ea397ddd36d479c99dd9f7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 28 Feb 2008 05:48:04 +0000 Subject: [PATCH] Fix CodeGen/Generic/storetrunc-fp.ll on sparc, PR2105 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47707 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/SparcISelDAGToDAG.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/lib/Target/Sparc/SparcISelDAGToDAG.cpp index 40fa95c294b..6e59631a81d 100644 --- a/lib/Target/Sparc/SparcISelDAGToDAG.cpp +++ b/lib/Target/Sparc/SparcISelDAGToDAG.cpp @@ -140,9 +140,10 @@ SparcTargetLowering::SparcTargetLowering(TargetMachine &TM) // Turn FP extload into load/fextend setLoadXAction(ISD::EXTLOAD, MVT::f32, Expand); - // Sparc doesn't have i1 sign extending load setLoadXAction(ISD::SEXTLOAD, MVT::i1, Promote); + // Turn FP truncstore into trunc + store. + setTruncStoreAction(MVT::f64, MVT::f32, Expand); // Custom legalize GlobalAddress nodes into LO/HI parts. setOperationAction(ISD::GlobalAddress, MVT::i32, Custom); -- 2.34.1