[llvm] r339791 - [x86] add fabs test for vector intrinsic to potential libcall bug; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 15 09:56:09 PDT 2018
Author: spatel
Date: Wed Aug 15 09:56:09 2018
New Revision: 339791
URL: http://llvm.org/viewvc/llvm-project?rev=339791&view=rev
Log:
[x86] add fabs test for vector intrinsic to potential libcall bug; NFC
This is a negative test for x86 because it has custom lowering for fabs.
Modified:
llvm/trunk/test/CodeGen/X86/vec-libcalls.ll
Modified: llvm/trunk/test/CodeGen/X86/vec-libcalls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec-libcalls.ll?rev=339791&r1=339790&r2=339791&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec-libcalls.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vec-libcalls.ll Wed Aug 15 09:56:09 2018
@@ -21,6 +21,7 @@ declare <3 x double> @llvm.sin.v3f64(<3
; Some of these have custom lowering, so those cases won't have
; libcalls.
+declare <2 x float> @llvm.fabs.v2f32(<2 x float>)
declare <2 x float> @llvm.ceil.v2f32(<2 x float>)
declare <2 x float> @llvm.cos.v2f32(<2 x float>)
declare <2 x float> @llvm.exp.v2f32(<2 x float>)
@@ -283,6 +284,15 @@ define <3 x double> @sin_v3f64(<3 x doub
ret <3 x double> %r
}
+define <2 x float> @fabs_v2f32(<2 x float> %x) nounwind {
+; CHECK-LABEL: fabs_v2f32:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vandps {{.*}}(%rip), %xmm0, %xmm0
+; CHECK-NEXT: retq
+ %r = call <2 x float> @llvm.fabs.v2f32(<2 x float> %x)
+ ret <2 x float> %r
+}
+
define <2 x float> @ceil_v2f32(<2 x float> %x) nounwind {
; CHECK-LABEL: ceil_v2f32:
; CHECK: # %bb.0:
More information about the llvm-commits
mailing list