[PATCH] D92203: [ConstantFold] Fold operations to poison if possible

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 26 21:28:17 PST 2020


aqjune added a comment.

Alive2's support for poison is so new that alive2.llvm.org isn't supporting it yet.
I'll attach the proof when poison is supported; I locally checked that the tests pass.



================
Comment at: llvm/test/Transforms/InstSimplify/ConstProp/poison.ll:114
+  %i4 = select i1 true, i8 poison, i8 %x
+  call void (...) @use(i1 %i1, i1 %i2, i8 %i3, i8 %i4, i8* getelementptr (i8, i8* poison, i64 1))
+  ret void
----------------
The GEP had to be written as a constant expr because InstSimplify's SimplifyGEPInst wasn't calling llvm::ConstantFoldGetElementPtr.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92203



More information about the llvm-commits mailing list