[PATCH] D90206: [PowerPC] Skip IEEE 128-bit FP type in FastISel

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 02:07:25 PDT 2020


qiucf updated this revision to Diff 300917.
qiucf retitled this revision from "[PowerPC] Fix IEEE 128-bit calling convention " to "[PowerPC] Skip IEEE 128-bit FP type in FastISel".
qiucf edited the summary of this revision.
qiucf added a comment.

Skip f128 in FastISel.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90206

Files:
  llvm/lib/Target/PowerPC/PPCFastISel.cpp
  llvm/test/CodeGen/PowerPC/f128-passByValue.ll


Index: llvm/test/CodeGen/PowerPC/f128-passByValue.ll
===================================================================
--- llvm/test/CodeGen/PowerPC/f128-passByValue.ll
+++ llvm/test/CodeGen/PowerPC/f128-passByValue.ll
@@ -266,3 +266,32 @@
   store double %conv1, double* %d1, align 8
   ret void
 }
+
+; Function Attrs: noinline optnone
+define signext i32 @noopt_call_crash() #0 {
+; CHECK-LABEL: noopt_call_crash:
+; CHECK:       # %bb.0: # %entry
+; CHECK-NEXT:    mflr r0
+; CHECK-NEXT:    std r0, 16(r1)
+; CHECK-NEXT:    stdu r1, -96(r1)
+; CHECK-NEXT:    .cfi_def_cfa_offset 96
+; CHECK-NEXT:    .cfi_offset lr, 16
+; CHECK-NEXT:    bl in
+; CHECK-NEXT:    nop
+; CHECK-NEXT:    bl out
+; CHECK-NEXT:    nop
+; CHECK-NEXT:    li r3, 0
+; CHECK-NEXT:    addi r1, r1, 96
+; CHECK-NEXT:    ld r0, 16(r1)
+; CHECK-NEXT:    mtlr r0
+; CHECK-NEXT:    blr
+entry:
+  %call = call fp128 @in()
+  call void @out(fp128 %call)
+  ret i32 0
+}
+
+declare void @out(fp128)
+declare fp128 @in()
+
+attributes #0 = { noinline optnone }
Index: llvm/lib/Target/PowerPC/PPCFastISel.cpp
===================================================================
--- llvm/lib/Target/PowerPC/PPCFastISel.cpp
+++ llvm/lib/Target/PowerPC/PPCFastISel.cpp
@@ -1626,7 +1626,7 @@
     if (!isTypeLegal(ArgTy, ArgVT) && ArgVT != MVT::i16 && ArgVT != MVT::i8)
       return false;
 
-    if (ArgVT.isVector())
+    if (ArgVT.isVector() || ArgVT == MVT::f128)
       return false;
 
     unsigned Arg = getRegForValue(ArgValue);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90206.300917.patch
Type: text/x-patch
Size: 1502 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201027/68632f7e/attachment.bin>


More information about the llvm-commits mailing list