summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMFastISel.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-11-13 09:44:21 +0000
committerChad Rosier <mcrosier@apple.com>2011-11-13 09:44:21 +0000
commit1198d894d02fd7a3f038a46f7c2c32e217a6b21f (patch)
tree6b5dbcf630585429aea9ca49bb5298c7a08fd210 /llvm/lib/Target/ARM/ARMFastISel.cpp
parentda7bc7d0000fe700493363036e792b929e86cb60 (diff)
downloadbcm5719-llvm-1198d894d02fd7a3f038a46f7c2c32e217a6b21f.tar.gz
bcm5719-llvm-1198d894d02fd7a3f038a46f7c2c32e217a6b21f.zip
The order in which the predicate is added differs between Thumb and ARM mode. Fix predicate when in ARM mode and restore SelectIntrinsicCall.
llvm-svn: 144494
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFastISel.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMFastISel.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp
index f3e6fc7781b..d3303671255 100644
--- a/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/llvm/lib/Target/ARM/ARMFastISel.cpp
@@ -2108,18 +2108,25 @@ bool ARMFastISel::SelectCall(const Instruction *I,
MachineInstrBuilder MIB;
unsigned CallOpc = ARMSelectCallOp(GV);
// Explicitly adding the predicate here.
- if(isThumb2)
- // Explicitly adding the predicate here.
- MIB = AddDefaultPred(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
- TII.get(CallOpc)));
- else
+ if(isThumb2) {
// Explicitly adding the predicate here.
MIB = AddDefaultPred(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
TII.get(CallOpc)));
- if (!IntrMemName)
- MIB.addGlobalAddress(GV, 0, 0);
- else
- MIB.addExternalSymbol(IntrMemName, 0);
+ if (!IntrMemName)
+ MIB.addGlobalAddress(GV, 0, 0);
+ else
+ MIB.addExternalSymbol(IntrMemName, 0);
+ } else {
+ if (!IntrMemName)
+ // Explicitly adding the predicate here.
+ MIB = AddDefaultPred(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
+ TII.get(CallOpc))
+ .addGlobalAddress(GV, 0, 0));
+ else
+ MIB = AddDefaultPred(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
+ TII.get(CallOpc))
+ .addExternalSymbol(IntrMemName, 0));
+ }
// Add implicit physical register uses to the call.
for (unsigned i = 0, e = RegArgs.size(); i != e; ++i)
@@ -2136,7 +2143,6 @@ bool ARMFastISel::SelectCall(const Instruction *I,
}
bool ARMFastISel::SelectIntrinsicCall(const IntrinsicInst &I) {
- if (!isThumb2) return false;
// FIXME: Handle more intrinsics.
switch (I.getIntrinsicID()) {
default: return false;
OpenPOWER on IntegriCloud