[PATCH] D101423: [InstCombine] Fold overflow bit of [u|s]mul.with.overflow in a poison-safe way
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 29 20:57:04 PDT 2021
aqjune marked an inline comment as done.
aqjune added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:5023
if (match(I, m_ExtractValue(m_WithOverflowInst(II))) &&
- match(ValAssumedPoison, m_ExtractValue(m_Specific(II))))
return true;
----------------
This update adds an inferences that if `a` is poison, `extract(mul_with_overflow(a, _), _)` is also poison.
This enables transformation
```
select(extract(mul_with_overflow(a, _), _), (a == 0), false)
=>
and(extract(mul_with_overflow(a, _), _), (a == 0))
```.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101423/new/
https://reviews.llvm.org/D101423
More information about the llvm-commits
mailing list