[PATCH] D151631: [InstSimplify] Simplify select i1 ConstExpr, i1 true, i1 false to ConstExpr

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 29 19:10:44 PDT 2023


khei4 added inline comments.


================
Comment at: llvm/test/Transforms/InstSimplify/select-inseltpoison.ll:890
+;
+  %s = select i1 %a, i32 ptrtoint (ptr getelementptr inbounds ([3 x ptr], ptr @a, i64 0, i64 1) to i32), i32 undef
+  ret i32 %s
----------------
I think 
`i32 ptrtoint (ptr getelementptr inbounds ([3 x ptr], ptr @a, i64 0, i64 1) to i32)` doesn't produce poison. 
index seems valid so maybe 
`i32 ptrtoint (ptr getelementptr inbounds ([3 x ptr], ptr @a, i64 1, i64 0) to i32)` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151631



More information about the llvm-commits mailing list