[all-commits] [llvm/llvm-project] 09cb9f: [InstCombine] Fold ult(add(x, -1), c) -> ule(x, c) if...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Tue Sep 20 08:45:25 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 09cb9fdef983719b509f43fe0e77762005265039
https://github.com/llvm/llvm-project/commit/09cb9fdef983719b509f43fe0e77762005265039
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-09-20 (Tue, 20 Sep 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/icmp-add.ll
M llvm/test/Transforms/LoopUnroll/AArch64/runtime-unroll-generic.ll
M llvm/test/Transforms/LoopUnroll/runtime-unroll-remainder.ll
M llvm/test/Transforms/LoopVectorize/AArch64/intrinsiccost.ll
M llvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll
M llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll
M llvm/test/Transforms/LoopVectorize/X86/intrinsiccost.ll
M llvm/test/Transforms/LoopVectorize/float-induction.ll
M llvm/test/Transforms/LoopVectorize/if-conversion-nest.ll
M llvm/test/Transforms/LoopVectorize/induction.ll
M llvm/test/Transforms/LoopVectorize/runtime-check.ll
Log Message:
-----------
[InstCombine] Fold ult(add(x,-1),c) -> ule(x,c) iff x != 0 (PR57635)
Alive2: https://alive2.llvm.org/ce/z/sZ6wwS
As detailed on Issue #57635 and #37628 - for unsigned comparisons, we can compare prior to a decrement iff the value is known never to be zero.
Differential Revision: https://reviews.llvm.org/D134172
More information about the All-commits
mailing list