[all-commits] [llvm/llvm-project] 71e39e: [ADT] Add APInt::isNegatedPowerOf2() helper
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Tue Oct 19 06:46:27 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 71e39e3f1867032a2fc0c19fa8d4881b39fc5a49
https://github.com/llvm/llvm-project/commit/71e39e3f1867032a2fc0c19fa8d4881b39fc5a49
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2021-10-19 (Tue, 19 Oct 2021)
Changed paths:
M llvm/include/llvm/ADT/APInt.h
M llvm/include/llvm/IR/PatternMatch.h
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
M llvm/lib/Target/AArch64/AArch64FastISel.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
M llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
M llvm/unittests/ADT/APIntTest.cpp
Log Message:
-----------
[ADT] Add APInt::isNegatedPowerOf2() helper
Inspired by D111968, provide a isNegatedPowerOf2() wrapper instead of obfuscating code with (-Value).isPowerOf2() patterns, which I'm sure are likely avenues for typos.....
Differential Revision: https://reviews.llvm.org/D111998
More information about the All-commits
mailing list