[llvm] r273002 - [X86][SSE4A] Remove the GCCBuiltins from the movntsd/movntss intrinsic defs so we can emit native IR from clang.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 07:27:38 PDT 2016


Author: rksimon
Date: Fri Jun 17 09:27:38 2016
New Revision: 273002

URL: http://llvm.org/viewvc/llvm-project?rev=273002&view=rev
Log:
[X86][SSE4A] Remove the GCCBuiltins from the movntsd/movntss intrinsic defs so we can emit native IR from clang.

Clang-side sibling commit to follow.

Modified:
    llvm/trunk/include/llvm/IR/IntrinsicsX86.td
    llvm/trunk/test/CodeGen/X86/sse4a-intrinsics-fast-isel.ll

Modified: llvm/trunk/include/llvm/IR/IntrinsicsX86.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IntrinsicsX86.td?rev=273002&r1=273001&r2=273002&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IntrinsicsX86.td (original)
+++ llvm/trunk/include/llvm/IR/IntrinsicsX86.td Fri Jun 17 09:27:38 2016
@@ -942,9 +942,9 @@ let TargetPrefix = "x86" in {  // All in
   def int_x86_sse4a_insertq  : GCCBuiltin<"__builtin_ia32_insertq">,
     Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>;
 
-  def int_x86_sse4a_movnt_ss : GCCBuiltin<"__builtin_ia32_movntss">,
+  def int_x86_sse4a_movnt_ss :
     Intrinsic<[], [llvm_ptr_ty, llvm_v4f32_ty], []>;
-  def int_x86_sse4a_movnt_sd : GCCBuiltin<"__builtin_ia32_movntsd">,
+  def int_x86_sse4a_movnt_sd :
     Intrinsic<[], [llvm_ptr_ty, llvm_v2f64_ty], []>;
 }
 

Modified: llvm/trunk/test/CodeGen/X86/sse4a-intrinsics-fast-isel.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse4a-intrinsics-fast-isel.ll?rev=273002&r1=273001&r2=273002&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse4a-intrinsics-fast-isel.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse4a-intrinsics-fast-isel.ll Fri Jun 17 09:27:38 2016
@@ -78,11 +78,10 @@ define void @test_stream_sd(double* %p,
 ; X64:       # BB#0:
 ; X64-NEXT:    movntsd %xmm0, (%rdi)
 ; X64-NEXT:    retq
-  %bc = bitcast double* %p to i8*
-  call void @llvm.x86.sse4a.movnt.sd(i8* %bc, <2 x double> %a)
+  %1 = extractelement <2 x double> %a, i64 0
+  store double %1, double* %p, align 1, !nontemporal !1
   ret void
 }
-declare void @llvm.x86.sse4a.movnt.sd(i8*, <2 x double>) nounwind readnone
 
 define void @test_mm_stream_ss(float* %p, <4 x float> %a) {
 ; X32-LABEL: test_mm_stream_ss:
@@ -95,8 +94,9 @@ define void @test_mm_stream_ss(float* %p
 ; X64:       # BB#0:
 ; X64-NEXT:    movntss %xmm0, (%rdi)
 ; X64-NEXT:    retq
-  %bc = bitcast float* %p to i8*
-  call void @llvm.x86.sse4a.movnt.ss(i8* %bc, <4 x float> %a)
+  %1 = extractelement <4 x float> %a, i64 0
+  store float %1, float* %p, align 1, !nontemporal !1
   ret void
 }
-declare void @llvm.x86.sse4a.movnt.ss(i8*, <4 x float>) nounwind readnone
+
+!1 = !{i32 1}




More information about the llvm-commits mailing list