r353718 - Make test actually test something (colons were missing)

Roman Lebedev via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 11 08:53:20 PST 2019


On Mon, Feb 11, 2019 at 7:38 PM Aaron Ballman via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
> On Mon, Feb 11, 2019 at 11:36 AM Nico Weber via cfe-commits
> <cfe-commits at lists.llvm.org> wrote:
> >
> > Author: nico
> > Date: Mon Feb 11 08:37:02 2019
> > New Revision: 353718
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=353718&view=rev
> > Log:
> > Make test actually test something (colons were missing)
>
> Good catch! I wonder if we could/should automatically catch this issue
> with a clang-tidy check of some kind?
Better idea: clang *needs* a tool to generate these check-lines automatically,
much like there is llvm's utils/update_test_checks.py for middle-end IR
and ./utils/update_llc_test_checks.py for back-end.

It's really painful to write these check lines by hand, tests are bad because
it is painful to write them, tests are partial because it is even more painful
to not mistake in the check lines, as it is evident here, etc etc.

> ~Aaron
Roman.

> >
> > Modified:
> >     cfe/trunk/test/CodeGen/ms-x86-intrinsics.c
> >
> > Modified: cfe/trunk/test/CodeGen/ms-x86-intrinsics.c
> > URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-x86-intrinsics.c?rev=353718&r1=353717&r2=353718&view=diff
> > ==============================================================================
> > --- cfe/trunk/test/CodeGen/ms-x86-intrinsics.c (original)
> > +++ cfe/trunk/test/CodeGen/ms-x86-intrinsics.c Mon Feb 11 08:37:02 2019
> > @@ -144,28 +144,28 @@ unsigned __int64 test__shiftleft128(unsi
> >    return __shiftleft128(l, h, d);
> >  }
> >  // CHECK-X64-LABEL: define dso_local i64 @test__shiftleft128(i64 %l, i64 %h, i8 %d)
> > -// CHECK-X64  = zext i64 %h to i128
> > -// CHECK-X64  = shl nuw i128 %0, 64
> > -// CHECK-X64  = zext i64 %l to i128
> > -// CHECK-X64  = or i128 %1, %2
> > -// CHECK-X64  = and i8 %d, 63
> > -// CHECK-X64  = shl i128 %
> > -// CHECK-X64  = lshr i128 %
> > -// CHECK-X64  = trunc i128 %
> > -// CHECK-X64  ret i64 %
> > +// CHECK-X64:  = zext i64 %h to i128
> > +// CHECK-X64:  = shl nuw i128 %0, 64
> > +// CHECK-X64:  = zext i64 %l to i128
> > +// CHECK-X64:  = or i128 %1, %2
> > +// CHECK-X64:  = and i8 %d, 63
> > +// CHECK-X64:  = shl i128 %
> > +// CHECK-X64:  = lshr i128 %
> > +// CHECK-X64:  = trunc i128 %
> > +// CHECK-X64:  ret i64 %
> >
> >  unsigned __int64 test__shiftright128(unsigned __int64 l, unsigned __int64 h,
> >                                       unsigned char d) {
> >    return __shiftright128(l, h, d);
> >  }
> >  // CHECK-X64-LABEL: define dso_local i64 @test__shiftright128(i64 %l, i64 %h, i8 %d)
> > -// CHECK-X64  = zext i64 %h to i128
> > -// CHECK-X64  = shl nuw i128 %
> > -// CHECK-X64  = zext i64 %l to i128
> > -// CHECK-X64  = or i128 %
> > -// CHECK-X64  = and i8 %d, 63
> > -// CHECK-X64  = lshr i128 %
> > -// CHECK-X64  = trunc i128 %
> > -// CHECK-X64  ret i64 %
> > +// CHECK-X64:  = zext i64 %h to i128
> > +// CHECK-X64:  = shl nuw i128 %
> > +// CHECK-X64:  = zext i64 %l to i128
> > +// CHECK-X64:  = or i128 %
> > +// CHECK-X64:  = and i8 %d, 63
> > +// CHECK-X64:  = lshr i128 %
> > +// CHECK-X64:  = trunc i128 %
> > +// CHECK-X64:  ret i64 %
> >
> >  #endif // defined(__x86_64__)
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list