[PATCH] D43451: [ARM] Mark -1 as cheap in xor's for thumb1

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 01:48:05 PST 2018


dmgreen created this revision.
dmgreen added reviewers: eli.friedman, spatel, samparker, john.brawn.
Herald added subscribers: kristof.beyls, javed.absar.

We can always convert xor %a, -1 into MVN, even in thumb 1 where the -1
would not otherwise be considered a cheap constant. This prevents the
-1's from being pulled out into constants and potentially hoisted.

The loop_2 tests are the only ones that change here.


https://reviews.llvm.org/D43451

Files:
  lib/Target/ARM/ARMTargetTransformInfo.cpp
  test/CodeGen/Thumb/mvn.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43451.134861.patch
Type: text/x-patch
Size: 3764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180219/e48308bf/attachment.bin>


More information about the llvm-commits mailing list