[PATCH] D57327: [ARM] Thumb2: ConstantMaterializationCost

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 30 11:31:15 PST 2019


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM with one nit.



================
Comment at: lib/Target/ARM/ARMISelDAGToDAG.cpp:454
     if (Subtarget->hasV6T2Ops() &&
-        (Val <= 0xffff || ARM_AM::getT2SOImmValSplatVal(Val) != -1))
-      return 1; // MOVW
+        (Val <= 0xffff || ARM_AM::getT2SOImmVal(Val) != -1 || // MOV + MOVW
+         ARM_AM::getT2SOImmVal(~Val) != -1))                  // MVN
----------------
The "+" here is misleading (especially given other nearby comments); either replace it with a "/", or put the checks on separate lines.


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

https://reviews.llvm.org/D57327





More information about the llvm-commits mailing list