[PATCH] D126056: [InstCombine] [NFC] Move transforms for truncated shifts into narrowBinOp
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 24 05:34:27 PDT 2022
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - but please add a test to verify that we do not create a bug with `shl`.
I think this would have miscompiled with the previous revision of the patch:
define <2 x i8> @trunc_lshr_trunc(<2 x i64> %a) {
%b = trunc <2 x i64> %a to <2 x i32>
%c = shl <2 x i32> %b, <i32 9, i32 7>
%d = trunc <2 x i32> %c to <2 x i8>
ret <2 x i8> %d
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126056/new/
https://reviews.llvm.org/D126056
More information about the llvm-commits
mailing list