[all-commits] [llvm/llvm-project] 6c39a3: [InstCombine] fold not-shift of signbit to icmp+zext
Sanjay Patel via All-commits
all-commits at lists.llvm.org
Mon Aug 29 07:09:27 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6c39a3aae1dcce6ba1373289480c49c2d41e0a88
https://github.com/llvm/llvm-project/commit/6c39a3aae1dcce6ba1373289480c49c2d41e0a88
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2022-08-29 (Mon, 29 Aug 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/test/Transforms/InstCombine/add.ll
M llvm/test/Transforms/InstCombine/high-bit-signmask.ll
Log Message:
-----------
[InstCombine] fold not-shift of signbit to icmp+zext
https://alive2.llvm.org/ce/z/j_8Wz9
The arithmetic shift was converted to logical shift with:
246078604c871d43
That does not seem to uncover any other missing/conflicting folds,
so convert directly to signbit test + cast.
We still need to fold the pattern with logical shift to test + cast.
This allows reducing patterns where the output type is not
the same as the input value:
https://alive2.llvm.org/ce/z/nydwFV
Fixes #57394
More information about the All-commits
mailing list