[PATCH] D70093: [InstCombine] Avoid moving ops that do restrict undef across shuffles.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 11 10:22:40 PST 2019
lebedev.ri added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/vec_shuffle.ll:1010-1016
-; CHECK-NEXT: [[AND:%.*]] = shufflevector <4 x i16> [[ADD:%.*]], <4 x i16> undef, <4 x i32> <i32 undef, i32 undef, i32 1, i32 1>
+; CHECK-NEXT: [[SHUFFLE:%.*]] = shufflevector <4 x i16> [[ADD:%.*]], <4 x i16> undef, <4 x i32> <i32 undef, i32 undef, i32 1, i32 1>
+; CHECK-NEXT: [[AND:%.*]] = and <4 x i16> [[SHUFFLE]], <i16 0, i16 0, i16 -1, i16 -1>
; CHECK-NEXT: ret <4 x i16> [[AND]]
;
entry:
%shuffle = shufflevector <4 x i16> %add, <4 x i16> undef, <4 x i32> <i32 undef, i32 undef, i32 1, i32 1>
%and = and <4 x i16> %shuffle, <i16 0, i16 0, i16 -1, i16 -1>
ret <4 x i16> %and
----------------
Hmm yes, i'd agree this is a miscompile..
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70093/new/
https://reviews.llvm.org/D70093
More information about the llvm-commits
mailing list