Skip to content
Commit e6375ca6 authored by Noah Goldstein's avatar Noah Goldstein Committed by Nikita Popov
Browse files

[InstCombine] Fix potentially buggy code in `((%x & C) == 0) --> %x u< (-C)` transform

While demanded bits constant shrinking appears to prevent this in
practice right now, it is principally possible for C2 to have
set bits that are known not-needed (zeroable). See: D140858

`+` will overflow here, `|` will get the right logic.

Differential Revision: https://reviews.llvm.org/D141089
parent 05d722a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment