[PATCH] D110488: [InstCombine] Canonicalize ((X & -X) - 1) --> (~X & (X - 1)) (PR51784)
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 24 08:21:50 PDT 2022
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp:1424
+ Constant *AllOnes = ConstantInt::getAllOnesValue(RHS->getType());
+ return BinaryOperator::CreateAnd(Builder.CreateXor(A, AllOnes),
+ Builder.CreateAdd(A, AllOnes));
----------------
Nondet output? Different evaluation order of args between compilers
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110488/new/
https://reviews.llvm.org/D110488
More information about the llvm-commits
mailing list