[PATCH] D20155: [ARM] PR25722 Support and tests for transform of LDR rt, = to MOV
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Wed May 11 10:50:50 PDT 2016
t.p.northover added a comment.
Couple of comments on this one, but only one that looks like it could be a real problem:
================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:6905
@@ +6904,3 @@
+ }
+ else if (hasV8MBaseline() &&
+ Value >=0 && Value < 65536) {
----------------
ARM::MOVi16's actual predicate is "[IsARM, HasV6T2]". It's probably an academic distinction, but checking for v8m in ARM-mode code looks weird.
================
Comment at: lib/Target/ARM/AsmParser/ARMAsmParser.cpp:6932
@@ +6931,3 @@
+ if (UseMov) {
+ TmpInst.addOperand(Inst.getOperand(0)); // Rt
+ TmpInst.addOperand(MCOperand::createImm(Value)); // Immediate
----------------
It looks like SP is a permitted register for t2LDRpci but not the Thumb MOVs.
http://reviews.llvm.org/D20155
More information about the llvm-commits
mailing list