[all-commits] [llvm/llvm-project] ffaaf2: [InstCombine] (rot X, ?) == 0/-1 --> X == 0/-1
ZCBing via All-commits
all-commits at lists.llvm.org
Wed May 18 20:29:45 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ffaaf2498bda550beeedadb79060323b8d3b0188
https://github.com/llvm/llvm-project/commit/ffaaf2498bda550beeedadb79060323b8d3b0188
Author: Chenbing Zheng <Chenbing.Zheng at streamcomputing.com>
Date: 2022-05-19 (Thu, 19 May 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
M llvm/test/Transforms/InstCombine/icmp-fsh.ll
Log Message:
-----------
[InstCombine] (rot X, ?) == 0/-1 --> X == 0/-1
In this patch we add a function foldICmpInstWithConstantAllowUndef
to fold integer comparisons with a constant operand: icmp Pred X, C
where X is some kind of instruction and C is AllowUndef.
We move this fold to the new function, so that it can solve undef elts in a vector.
Reviewed By: spatel, RKSimon
Differential Revision: https://reviews.llvm.org/D125220
More information about the All-commits
mailing list