[PATCH] D124067: [x86] Support 3 builtin functions for 32-bits targets

Xiang Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 20 01:45:11 PDT 2022


xiangzhangllvm added inline comments.


================
Comment at: clang/test/CodeGen/X86/sse2-builtins.c:560
   // CHECK: insertelement <2 x i64> %{{.*}}, i64 0, i32 1
+  // X86-LABEL: test_mm_cvtsi64_si128
+  // X86: insertelement <2 x i64> undef, i64 %{{.*}}, i32 0
----------------
xiangzhangllvm wrote:
> RKSimon wrote:
> > xiangzhangllvm wrote:
> > > craig.topper wrote:
> > > > Do we need the X86 prefix because of the x86-64 #ifdefs? Or are there other differences?
> > > > 
> > > > If it's just the x86-64, can we add -check-prefixes=CHECK,X64 to the x86-64 run lines and use X64 for the x86-64 only functions. That way CHECK can be used for all the common tests.
> > > Before I change the test, it only build with "-triple=x86_64", So all the CHECK should be X64 prefix. 
> > > So I add X86 prefix to just let "RUN ... -triple=i386" only check the updated 3 builtins. (let the change be small).
> > > 
> > I'd much prefer we have complete test check prefix coverage for every RUN - and tbh we should be properly testing 32-bit on every x86 intrinsic test file.
> Yes, testing 32-bit on every x86 intrinsic test file is make sense. I also confuse why this test not testing the 32-bit mode before. I think it is "defect" for the test.
> But how can I well update the test by on checking the 3 updated intrinsics. Because it is strange to update the other intrinsics checking when I only update 3 intrinsics in clang.
Hi @craig.topper , @RKSimon, if the 32 and 64 has common prefix "CHECK", it means the line 4 (32 bits) need to check all other intrinsics. That means I need to updated a lot check string for the 32 bit mode. 
What's more, currently we have no tools to auto generate the checking code for clang test. 



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124067/new/

https://reviews.llvm.org/D124067



More information about the cfe-commits mailing list