[llvm] r364069 - [NFC] Added more tests for D63652
Dávid Bolvanský via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 10:45:19 PDT 2019
This case will fold.
define <3 x i64> @shl_sub_i64_vec_undef1(<3 x i64> %x) {
; CHECK-LABEL: @shl_sub_i64_vec_undef1(
; CHECK-NEXT: [[R:%.*]] = lshr <3 x i64> <i64 -9223372036854775808, i64
-9223372036854775808, i64 -9223372036854775808>, [[X:%.*]]
; CHECK-NEXT: ret <3 x i64> [[R]]
;
%s = sub <3 x i64> <i64 63, i64 63, i64 63>, %x
%r = shl <3 x i64> <i64 1, i64 undef, i64 1>, %s
ret <3 x i64> %r
}
pi 21. 6. 2019 o 18:33 Roman Lebedev <lebedev.ri at gmail.com> napísal(a):
> On Fri, Jun 21, 2019 at 7:10 PM David Bolvansky via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> >
> > Author: xbolva00
> > Date: Fri Jun 21 09:14:13 2019
> > New Revision: 364069
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=364069&view=rev
> > Log:
> > [NFC] Added more tests for D63652
> >
> > Modified:
> > llvm/trunk/test/Transforms/InstCombine/shl-sub.ll
> >
> > Modified: llvm/trunk/test/Transforms/InstCombine/shl-sub.ll
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/shl-sub.ll?rev=364069&r1=364068&r2=364069&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/test/Transforms/InstCombine/shl-sub.ll (original)
> > +++ llvm/trunk/test/Transforms/InstCombine/shl-sub.ll Fri Jun 21
> 09:14:13 2019
> > @@ -148,5 +148,38 @@ define <2 x i64> @bad_shl_sub_i64_vec(<2
> > ret <2 x i64> %r
> > }
> >
> > +define <3 x i64> @shl_sub_i64_vec_undef0(<3 x i64> %x) {
> > +; CHECK-LABEL: @shl_sub_i64_vec_undef0(
> > +; CHECK-NEXT: [[S:%.*]] = sub <3 x i64> <i64 63, i64 undef, i64 63>,
> [[X:%.*]]
> > +; CHECK-NEXT: [[R:%.*]] = shl <3 x i64> <i64 1, i64 1, i64 1>, [[S]]
> > +; CHECK-NEXT: ret <3 x i64> [[R]]
> > +;
> > + %s = sub <3 x i64> <i64 63, i64 undef, i64 63>, %x
> > + %r = shl <3 x i64> <i64 1, i64 1, i64 1>, %s
> > + ret <3 x i64> %r
> > +}
> > +
> > +define <3 x i64> @shl_sub_i64_vec_undef1(<3 x i64> %x) {
> > +; CHECK-LABEL: @shl_sub_i64_vec_undef1(
> > +; CHECK-NEXT: [[S:%.*]] = sub <3 x i64> <i64 63, i64 undef, i64 63>,
> [[X:%.*]]
> > +; CHECK-NEXT: [[R:%.*]] = shl <3 x i64> <i64 1, i64 undef, i64 1>,
> [[S]]
> > +; CHECK-NEXT: ret <3 x i64> [[R]]
> > +;
> > + %s = sub <3 x i64> <i64 63, i64 undef, i64 63>, %x
> > + %r = shl <3 x i64> <i64 1, i64 undef, i64 1>, %s
> I messed this up i guess, here only the second undef should be here
>
> > + ret <3 x i64> %r
> > +}
> > +
> > +define <3 x i64> @shl_sub_i64_vec_undef2(<3 x i64> %x) {
> > +; CHECK-LABEL: @shl_sub_i64_vec_undef2(
> > +; CHECK-NEXT: [[S:%.*]] = sub <3 x i64> <i64 63, i64 undef, i64 63>,
> [[X:%.*]]
> > +; CHECK-NEXT: [[R:%.*]] = shl <3 x i64> <i64 1, i64 undef, i64 1>,
> [[S]]
> > +; CHECK-NEXT: ret <3 x i64> [[R]]
> > +
> > + %s = sub <3 x i64> <i64 63, i64 undef, i64 63>, %x
> > + %r = shl <3 x i64> <i64 1, i64 undef, i64 1>, %s
> > + ret <3 x i64> %r
> This test is identical to @shl_sub_i64_vec_undef1
>
> > +}
> > +
> >
> > declare void @use(i32)
> Roman
>
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190621/13234696/attachment.html>
More information about the llvm-commits
mailing list