Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Unified Diff: lib/Target/ARM/ARMFastISel.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Target/ARM/ARMExpandPseudoInsts.cpp ('k') | lib/Target/ARM/ARMFrameLowering.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Target/ARM/ARMFastISel.cpp
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp
index 29462f7a8eb82e3cfda50486b6c224ba35bf60a4..83130dd788fd3f40c16f709724c6bc8d5cff62ed 100644
--- a/lib/Target/ARM/ARMFastISel.cpp
+++ b/lib/Target/ARM/ARMFastISel.cpp
@@ -492,6 +492,11 @@ unsigned ARMFastISel::ARMMaterializeFP(const ConstantFP *CFP, MVT VT) {
// Require VFP2 for loading fp constants.
if (!Subtarget->hasVFP2()) return false;
+ // @LOCALMOD-START
+ if (!Subtarget->useConstIslands())
+ return false;
+ // @LOCALMOD-END
+
// MachineConstantPool wants an explicit alignment.
unsigned Align = DL.getPrefTypeAlignment(CFP->getType());
if (Align == 0) {
@@ -553,6 +558,12 @@ unsigned ARMFastISel::ARMMaterializeInt(const Constant *C, MVT VT) {
if (ResultReg)
return ResultReg;
+ // @LOCALMOD-START -- Can this just be an assert? (useMovt should be true
+ // so the above code would have handled the constant).
+ if (!Subtarget->useConstIslands())
+ return false;
+ // @LOCALMOD-END
+
// Load from constant pool. For now 32-bit only.
if (VT != MVT::i32)
return 0;
@@ -615,6 +626,11 @@ unsigned ARMFastISel::ARMMaterializeGV(const GlobalValue *GV, MVT VT) {
AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc,
TII.get(Opc), DestReg).addGlobalAddress(GV, 0, TF));
} else {
+ // @LOCALMOD-BEGIN
+ if (!Subtarget->useConstIslands())
+ return false;
+ // @LOCALMOD-END
+
// MachineConstantPool wants an explicit alignment.
unsigned Align = DL.getPrefTypeAlignment(GV->getType());
if (Align == 0) {
« no previous file with comments | « lib/Target/ARM/ARMExpandPseudoInsts.cpp ('k') | lib/Target/ARM/ARMFrameLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698