[llvm-commits] [llvm] r66429 - in /llvm/trunk: lib/Target/ARM/ARMISelLowering.cpp test/CodeGen/ARM/2009-03-09-AddrModeBug.ll

Evan Cheng evan.cheng at apple.com
Mon Mar 9 12:15:00 PDT 2009


Author: evancheng
Date: Mon Mar  9 14:15:00 2009
New Revision: 66429

URL: http://llvm.org/viewvc/llvm-project?rev=66429&view=rev
Log:
ARM isLegalAddressImmediate should check if type is a simple type now that optimizer can create values of funky scalar types.

Added:
    llvm/trunk/test/CodeGen/ARM/2009-03-09-AddrModeBug.ll
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=66429&r1=66428&r2=66429&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Mon Mar  9 14:15:00 2009
@@ -1591,6 +1591,9 @@
   if (V == 0)
     return true;
 
+  if (!VT.isSimple())
+    return false;
+
   if (Subtarget->isThumb()) {
     if (V < 0)
       return false;

Added: llvm/trunk/test/CodeGen/ARM/2009-03-09-AddrModeBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2009-03-09-AddrModeBug.ll?rev=66429&view=auto

==============================================================================
--- llvm/trunk/test/CodeGen/ARM/2009-03-09-AddrModeBug.ll (added)
+++ llvm/trunk/test/CodeGen/ARM/2009-03-09-AddrModeBug.ll Mon Mar  9 14:15:00 2009
@@ -0,0 +1,13 @@
+; RUN: llvm-as < %s | llc -march=arm
+
+	%struct.hit_t = type { %struct.v_t, double }
+	%struct.node_t = type { %struct.hit_t, %struct.hit_t, i32 }
+	%struct.v_t = type { double, double, double }
+
+define fastcc %struct.node_t* @_ZL6createP6node_tii3v_tS1_d(%struct.node_t* %n, i32 %lvl, i32 %dist, i64 %c.0.0, i64 %c.0.1, i64 %c.0.2, i64 %d.0.0, i64 %d.0.1, i64 %d.0.2, double %r) nounwind {
+entry:
+	%0 = getelementptr %struct.node_t* %n, i32 0, i32 1		; <%struct.hit_t*> [#uses=1]
+	%1 = bitcast %struct.hit_t* %0 to i256*		; <i256*> [#uses=1]
+	store i256 0, i256* %1, align 4
+	unreachable
+}





More information about the llvm-commits mailing list