[PATCH] D109537: [InstCombine] move extend after insertelement if both operands are extended
Anton Afanasyev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 15 10:07:05 PDT 2021
anton-afanasyev added a comment.
In D109537#3001567 <https://reviews.llvm.org/D109537#3001567>, @spatel wrote:
> What I meant is that the tests in that patch are reduced by instcombine after this patch, so there's nothing left for AIC to do if regular instcombine runs first:
>
> $ opt -instcombine 109236.ll -S
>
> define <2 x i16> @extract_insert(<2 x i8> %a, <2 x i8> %b) {
> %1 = shufflevector <2 x i8> %b, <2 x i8> %a, <2 x i32> <i32 0, i32 2>
> %trunc = zext <2 x i8> %1 to <2 x i16>
> ret <2 x i16> %trunc
> }
>
> define <2 x i16> @insert_poison(i8 %a) {
> %1 = zext i8 %a to i16
> %trunc = insertelement <2 x i16> undef, i16 %1, i32 0
> ret <2 x i16> %trunc
> }
Ok, I see. Rebased D109236 <https://reviews.llvm.org/D109236> agains new test added.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109537/new/
https://reviews.llvm.org/D109537
More information about the llvm-commits
mailing list