[llvm] r200027 - Add a testcase for the changes in r199938.
Lang Hames
lhames at gmail.com
Fri Jan 24 11:00:19 PST 2014
Author: lhames
Date: Fri Jan 24 13:00:19 2014
New Revision: 200027
URL: http://llvm.org/viewvc/llvm-project?rev=200027&view=rev
Log:
Add a testcase for the changes in r199938.
<rdar://problem/15611947>
Modified:
llvm/trunk/test/CodeGen/X86/fma.ll
Modified: llvm/trunk/test/CodeGen/X86/fma.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fma.ll?rev=200027&r1=200026&r2=200027&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fma.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fma.ll Fri Jan 24 13:00:19 2014
@@ -43,9 +43,9 @@ entry:
}
; Test FMA3 variant selection
-; CHECK: fma3_select231:
-; CHECK: vfmadd231ss
-define float @fma3_select231(float %x, float %y, i32 %N) #0 {
+; CHECK: fma3_select231ssX:
+; CHECK: vfmadd231ss xmm
+define float @fma3_select231ssX(float %x, float %y) #0 {
entry:
br label %while.body
while.body: ; preds = %while.body, %while.body
@@ -57,6 +57,24 @@ while.end:
ret float %acc
}
+; Test FMA3 variant selection
+; CHECK: fma3_select231pdY:
+; CHECK: vfmadd231pd ymm
+define <4 x double> @fma3_select231pdY(<4 x double> %x, <4 x double> %y) #0 {
+entry:
+ br label %while.body
+while.body: ; preds = %entry, %while.body
+ %acc.04 = phi <4 x double> [ zeroinitializer, %entry ], [ %add, %while.body ]
+ %add = tail call <4 x double> @llvm.fma.v4f64(<4 x double> %x, <4 x double> %y, <4 x double> %acc.04)
+ %vecext = extractelement <4 x double> %add, i32 0
+ %cmp = fcmp oeq double %vecext, 0.000000e+00
+ br i1 %cmp, label %while.body, label %while.end
+
+while.end: ; preds = %while.body
+ ret <4 x double> %add
+}
+
declare float @llvm.fma.f32(float, float, float) nounwind readnone
declare double @llvm.fma.f64(double, double, double) nounwind readnone
declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) nounwind readnone
+declare <4 x double> @llvm.fma.v4f64(<4 x double>, <4 x double>, <4 x double>) nounwind readnone
More information about the llvm-commits
mailing list