[llvm-commits] [llvm] r146700 - /llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp

Eli Friedman eli.friedman at gmail.com
Thu Dec 15 14:56:53 PST 2011


Author: efriedma
Date: Thu Dec 15 16:56:53 2011
New Revision: 146700

URL: http://llvm.org/viewvc/llvm-project?rev=146700&view=rev
Log:
Make check a bit more strict so we don't call ARM_AM::getFP32Imm with a value that isn't a 32-bit value.  (This is just to be safe; I don't think this actually causes any issues in practice.)


Modified:
    llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=146700&r1=146699&r2=146700&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Thu Dec 15 16:56:53 2011
@@ -4009,7 +4009,7 @@
       }
 
       // Use vmov.f32 to materialize other v2f32 and v4f32 splats.
-      if (VT == MVT::v2f32 || VT == MVT::v4f32) {
+      if ((VT == MVT::v2f32 || VT == MVT::v4f32) && SplatBitSize == 32) {
         int ImmVal = ARM_AM::getFP32Imm(SplatBits);
         if (ImmVal != -1) {
           SDValue Val = DAG.getTargetConstant(ImmVal, MVT::i32);





More information about the llvm-commits mailing list