[llvm-commits] [llvm] r115984 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
Eric Christopher
echristo at apple.com
Thu Oct 7 14:40:18 PDT 2010
Author: echristo
Date: Thu Oct 7 16:40:18 2010
New Revision: 115984
URL: http://llvm.org/viewvc/llvm-project?rev=115984&view=rev
Log:
Remember to promote load/store types for stack to register size.
Modified:
llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=115984&r1=115983&r2=115984&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Thu Oct 7 16:40:18 2010
@@ -629,6 +629,9 @@
bool ARMFastISel::ARMLoadAlloca(const Instruction *I, EVT VT) {
Value *Op0 = I->getOperand(0);
+ // Promote load/store types.
+ if (VT == MVT::i8 || VT == MVT::i16) VT = MVT::i32;
+
// Verify it's an alloca.
if (const AllocaInst *AI = dyn_cast<AllocaInst>(Op0)) {
DenseMap<const AllocaInst*, int>::iterator SI =
@@ -735,6 +738,9 @@
bool ARMFastISel::ARMStoreAlloca(const Instruction *I, unsigned SrcReg, EVT VT){
Value *Op1 = I->getOperand(1);
+ // Promote load/store types.
+ if (VT == MVT::i8 || VT == MVT::i16) VT = MVT::i32;
+
// Verify it's an alloca.
if (const AllocaInst *AI = dyn_cast<AllocaInst>(Op1)) {
DenseMap<const AllocaInst*, int>::iterator SI =
More information about the llvm-commits
mailing list