[PATCH] D101900: [InstCombine] Fold extractelement + vector GEP with one use
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 24 09:12:08 PDT 2021
sdesmalen added a comment.
Other than my two nits, the patch looks good to me!
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:462-464
+ assert(EC == OpTy->getElementCount() &&
+ "Expected vector GEP operand to have the same element "
+ "count as the result");
----------------
nit: I think this assert is unnecessary, because we can assume the incoming IR was legal to begin with.
================
Comment at: llvm/test/Transforms/InstCombine/gep-vector-indices.ll:10
+;
+entry:
+ %gep = getelementptr i32, i32* %a, <2 x i64> <i64 4, i64 4>
----------------
nit: is `entry:` needed? (I don't see it used in the other tests you had to fix in this patch)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101900/new/
https://reviews.llvm.org/D101900
More information about the llvm-commits
mailing list