aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp
diff options
context:
space:
mode:
authorzGoldthorpe <Zach.Goldthorpe@amd.com>2025-10-08 06:58:11 -0600
committerGitHub <noreply@github.com>2025-10-08 06:58:11 -0600
commit7910ed22320c5f298c4645ffa9072238c95bc7d6 (patch)
treea7f69b8eac13762766ac477264c917d371fe316a /llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp
parentf53b6249c24005d1a6208cd9e355595eb6519dc0 (diff)
downloadllvm-7910ed22320c5f298c4645ffa9072238c95bc7d6.zip
llvm-7910ed22320c5f298c4645ffa9072238c95bc7d6.tar.gz
llvm-7910ed22320c5f298c4645ffa9072238c95bc7d6.tar.bz2
[InstCombine] Canonicalise packed-integer-selecting shifts (#162147)
This patch resolves recent regressions related to [issue #92891](https://github.com/llvm/llvm-project/issues/92891). It specifically enables the following types of reductions. ```llvm define i16 @src(i32 %mask, i32 %upper, i32 range(i32 0, 65536) %lower) { %upper.shl = shl nuw i32 %upper, 16 %pack = or disjoint i32 %upper.shl, %lower %mask.bit = and i32 %mask, 16 %sel = lshr i32 %pack, %mask.bit %trunc = trunc i32 %sel to i16 ret i16 %trunc } ; => define i16 @tgt(i32 %mask, i32 %upper, i32 range(i32 0, 65536) %lower) { %mask.bit = and i32 %mask, 16 %mask.bit.z = icmp eq i32 %mask.bit, 0 %sel = select i1 %mask.bit.z, i32 %lower, i32 %upper %trunc = trunc i32 %sel to i16 ret i16 %trunc } ``` Alive2 proofs: [gJ9MpP](https://alive2.llvm.org/ce/z/gJ9MpP)
Diffstat (limited to 'llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp')
0 files changed, 0 insertions, 0 deletions