[all-commits] [llvm/llvm-project] f6bb15: [InstCombine] Fold icmp(X) ? f(X) : C
Alexander Shaposhnikov via All-commits
all-commits at lists.llvm.org
Mon Apr 11 18:33:14 PDT 2022
Author: Alexander Shaposhnikov <ashaposhnikov at google.com>
Date: 2022-04-12 (Tue, 12 Apr 2022)
[InstCombine] Fold icmp(X) ? f(X) : C
This diff extends foldSelectInstWithICmp to handle the case icmp(X) ? f(X) : C
when f(X) is guaranteed to be equal to C for all X in the exact range of the inverse predicate.
This addresses the issue https://github.com/llvm/llvm-project/issues/54089.
Differential revision: https://reviews.llvm.org/D123159
Test plan: make check-all
More information about the All-commits