[PATCH] D57327: [ARM] Thumb2: ConstantMaterializationCost

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 15:49:05 PST 2019


efriedma added a comment.

Maybe put the tests into test/CodeGen/ARM/subtarget-no-movt.ll? We have some similar tests there from https://reviews.llvm.org/D23090 .



================
Comment at: lib/Target/ARM/ARMISelDAGToDAG.cpp:454
     if (Subtarget->hasV6T2Ops() &&
-        (Val <= 0xffff || ARM_AM::getT2SOImmValSplatVal(Val) != -1))
+        (Val <= 0xffff || ARM_AM::getT2SOImmVal(Val) != -1 ||  // MOV
+         ARM_AM::getT2SOImmVal(~Val) != -1))                   // MVN
----------------
I don't think the change from getT2SOImmValSplatVal to getT2SOImmVal makes much practical difference; isThumbImmShiftedVal covers the same cases.  But I guess it's more clear, at least.

Maybe fix the MOV/MVN/MOVW comments so they're each on the same line as the corresponding check?


================
Comment at: test/CodeGen/ARM/shifter_operand.ll:262
+
+define hidden i32 @no_litpool() local_unnamed_addr #0 {
+; CHECK-LABEL:  no_litpool:
----------------
You can put the attributes inline here (instead of "#0", just write "optsize minsize").


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57327/new/

https://reviews.llvm.org/D57327





More information about the llvm-commits mailing list