[InstSimplify] Handle vector GEP when simplifying zero indices
authorNikita Popov <npopov@redhat.com>
Fri, 11 Mar 2022 09:55:48 +0000 (10:55 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 11 Mar 2022 09:56:44 +0000 (10:56 +0100)
commit02c21060029cff4fdfd9eab3011a1fec6de2f9a0
treedc39d822032248aa564f34bc0c61e349cafadd1a
parentd7645f4ef866059da66442308c4c015c55b84e02
[InstSimplify] Handle vector GEP when simplifying zero indices

If the base is a scalar and the index is a vector, we can't
simplify, as this is effectively a splat operation.
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/opaque-ptr.ll