[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
Wed Feb 21 02:13:52 PST 2018
dmgreen added inline comments.
================
Comment at: llvm/trunk/lib/Target/ARM/ARMTargetTransformInfo.cpp:131
+ if (Opcode == Instruction::Xor) {
+ int64_t NegImm = Imm.getSExtValue();
+ if (NegImm == -1)
----------------
efriedma wrote:
> getSExtValue() will crash if Imm doesn't fit into an int64_t. Maybe use `isAllOnesValue()`?
Ah. Where it's not -1. Of course. Sorry about that, thanks for the catch.
https://reviews.llvm.org/D43549
Repository:
rL LLVM
https://reviews.llvm.org/D43451
More information about the llvm-commits
mailing list