[all-commits] [llvm/llvm-project] f55d1e: [InstCombine] use decomposeBitTestICmp to make icm...
RotateRight via All-commits
all-commits at lists.llvm.org
Sun Nov 28 07:04:01 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f55d1eb3746a17688ca10d4e699ccea7d0f15378
https://github.com/llvm/llvm-project/commit/f55d1eb3746a17688ca10d4e699ccea7d0f15378
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-11-28 (Sun, 28 Nov 2021)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/and-compare.ll
M llvm/test/Transforms/InstCombine/compare-signs.ll
M llvm/test/Transforms/InstCombine/getelementptr.ll
M llvm/test/Transforms/InstCombine/icmp-trunc.ll
M llvm/test/Transforms/InstCombine/select-icmp-and.ll
M llvm/test/Transforms/InstCombine/select-with-bitwise-ops.ll
M llvm/test/Transforms/InstCombine/signed-truncation-check.ll
Log Message:
-----------
[InstCombine] use decomposeBitTestICmp to make icmp (trunc X), C more consistent
This is a follow-on suggested in D112634.
Two folds that were added with that patch are subsumed in the call to
decomposeBitTestICmp, and two other folds are potentially inverted.
The deleted folds were very specialized by instcombine standards
because they were restricted to legal integer types based on the data
layout. This generalizes the canonical form independent of target/types.
This change has a reasonable chance of exposing regressions either in
IR or codegen, but I don't have any evidence for either of those yet.
A spot check of asm across several in-tree targets shows variations
that I expect are mostly neutral.
We have one improvement in an existing IR test that I noted with a
comment. Using mask ops might also make more code match with D114272.
Differential Revision: https://reviews.llvm.org/D114386
More information about the All-commits
mailing list