[PATCH] D71960: [Attributor] AAUndefinedBehavior: AAValueSimplify in memory accessing instructions.

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 28 14:58:44 PST 2019


baziotis marked 2 inline comments as done.
baziotis added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2000
+      // or we got back a simplified value to continue.
+      Optional<Value *> SimplifiedPtrOp = stopOnUndefOrAssumed(A, PtrOp, &I);
+      if (!SimplifiedPtrOp.hasValue())
----------------
jdoerfert wrote:
> Where is `stopOnUndefOrAssumed` defined?
Sorry, I should have mentioned in the summary that this diff is based on: https://reviews.llvm.org/D71799
That is already accepted and will be committed so I thought it would be good to not wait for it to actually be commited.


================
Comment at: llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll:9
+;    live value is from %entry. Right now, AAIsDead does not
+;    interact with AAUB to know about the dead for.cond1.
 define void @fn2(i32* %P) {
----------------
jdoerfert wrote:
> This test is actually really broken. The function can never be executed w/o causing UB. We need to fix these tests to have some behavior. 
Did I break anything? As far as I could understand, this was true before as well.
Or just a general comment? I personally think that now we have `AAUB`, it's ok to have "always UB" functions on tests that are supposed to test UB (like in the `undefined_behavior.ll`) but here it may be irrelevant to always have UB.


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

https://reviews.llvm.org/D71960





More information about the llvm-commits mailing list