[llvm-commits] [llvm] r49016 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp test/CodeGen/ARM/fpconv.ll

Evan Cheng evan.cheng at apple.com
Mon Mar 31 19:18:22 PDT 2008


Author: evancheng
Date: Mon Mar 31 21:18:22 2008
New Revision: 49016

URL: http://llvm.org/viewvc/llvm-project?rev=49016&view=rev
Log:
More soft fp fixes.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
    llvm/trunk/test/CodeGen/ARM/fpconv.ll

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=49016&r1=49015&r2=49016&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Mar 31 21:18:22 2008
@@ -5369,7 +5369,8 @@
   MVT::ValueType SourceVT = Source.getValueType();
   bool ExpandSource = getTypeAction(SourceVT) == Expand;
 
-  if (!isSigned) {
+  // Special case for i32 source to take advantage of UINTTOFP_I32_F32, etc.
+  if (!isSigned && SourceVT != MVT::i32) {
     // The integer value loaded will be incorrectly if the 'sign bit' of the
     // incoming integer is set.  To handle this, we dynamically test to see if
     // it is set, and, if so, add a fudge factor.

Modified: llvm/trunk/test/CodeGen/ARM/fpconv.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/fpconv.ll?rev=49016&r1=49015&r2=49016&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/ARM/fpconv.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/fpconv.ll Mon Mar 31 21:18:22 2008
@@ -16,8 +16,10 @@
 ; RUN: grep fixunssfsi %t
 ; RUN: grep fixdfsi %t
 ; RUN: grep fixunsdfsi %t
-; RUN: grep floatdisf %t
+; RUN: grep floatsisf %t
 ; RUN: grep floatsidf %t
+; RUN: grep floatunsisf %t
+; RUN: grep floatunsidf %t
 ; RUN: llvm-as < %s | llc -march=thumb
 
 define float @f1(double %x) {





More information about the llvm-commits mailing list