Skip to content
Commit ffaaf249 authored by Chenbing Zheng's avatar Chenbing Zheng
Browse files

[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
parent 51df77f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment