[PATCH] D137934: [InstCombine] Fold extractelt with select of constants

Thomas Symalla via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 11:27:06 PST 2022


tsymalla added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/extractelement.ll:816
+}
+
 define i32 @extelt_select_const_operand_extractelt_use(i1 %c) {
----------------
arsenm wrote:
> Needs a test with an out of bounds vector index 
Hmm, I don't know if that makes sense. A trivial case with an `extractelement` with OOB behavior will not be caught by my code, as far as I can see, so it will be folded to a `poison` value.
I'll double-check and probably remove the OOB check in my code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137934



More information about the llvm-commits mailing list