[Sparc] Fix lowering FABS on fp128 (long double) on pre-v9 targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191154 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/SPARC/fp128.ll b/test/CodeGen/SPARC/fp128.ll
index 1538199..e3d3613 100644
--- a/test/CodeGen/SPARC/fp128.ll
+++ b/test/CodeGen/SPARC/fp128.ll
@@ -96,3 +96,20 @@
"7": ; preds = %entry
ret i32 1
}
+
+
+; HARD-LABEL: f128_abs
+; HARD: fabss
+
+; SOFT-LABEL: f128_abs
+; SOFT: fabss
+
+define void @f128_abs(fp128* noalias sret %scalar.result, fp128* byval %a) {
+entry:
+ %0 = load fp128* %a, align 8
+ %1 = tail call fp128 @llvm.fabs.f128(fp128 %0)
+ store fp128 %1, fp128* %scalar.result, align 8
+ ret void
+}
+
+declare fp128 @llvm.fabs.f128(fp128) nounwind readonly