[PATCH] D85184: [Attributor][WIP] Deduce noundef attribute

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 01:29:57 PDT 2020


aqjune added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:7178
+        case Instruction::SRem:
+          return true;
+        }
----------------
A value that is used as a divisor of div/rem can still have undef bits.
```
a = undef | 1 ; a is not noundef because it has undef bits
x = udiv 100, a ; this is not UB
```
Can we use `isGuaranteedNotToBeUndefOrPoison` instead?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85184/new/

https://reviews.llvm.org/D85184



More information about the llvm-commits mailing list