[PATCH] D136241: [NFC][CostModel] Added floating point frem test for SVE

Jolanta Jensen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 03:37:50 PDT 2022


jolanta.jensen created this revision.
Herald added a subscriber: tschuett.
Herald added a project: All.
jolanta.jensen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136241

Files:
  llvm/test/Analysis/CostModel/AArch64/arith-fp-sve.ll


Index: llvm/test/Analysis/CostModel/AArch64/arith-fp-sve.ll
===================================================================
--- llvm/test/Analysis/CostModel/AArch64/arith-fp-sve.ll
+++ llvm/test/Analysis/CostModel/AArch64/arith-fp-sve.ll
@@ -134,3 +134,29 @@
 
   ret void
 }
+
+define void @frem() {
+; CHECK-LABEL: 'frem'
+; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %V4F16 = frem <vscale x 4 x half> undef, undef
+; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %V8F16 = frem <vscale x 8 x half> undef, undef
+; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %V16F16 = frem <vscale x 16 x half> undef, undef
+; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %V2F32 = frem <vscale x 2 x float> undef, undef
+; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %V4F32 = frem <vscale x 4 x float> undef, undef
+; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %V8F32 = frem <vscale x 8 x float> undef, undef
+; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %V2F64 = frem <vscale x 2 x double> undef, undef
+; CHECK-NEXT:  Cost Model: Invalid cost for instruction: %V4F64 = frem <vscale x 4 x double> undef, undef
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
+;
+  %V4F16 = frem <vscale x 4 x half> undef, undef
+  %V8F16 = frem <vscale x 8 x half> undef, undef
+  %V16F16 = frem <vscale x 16 x half> undef, undef
+
+  %V2F32 = frem <vscale x 2 x float> undef, undef
+  %V4F32 = frem <vscale x 4 x float> undef, undef
+  %V8F32 = frem <vscale x 8 x float> undef, undef
+
+  %V2F64 = frem <vscale x 2 x double> undef, undef
+  %V4F64 = frem <vscale x 4 x double> undef, undef
+
+  ret void
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136241.468853.patch
Type: text/x-patch
Size: 1693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221019/fa9744bb/attachment.bin>


More information about the llvm-commits mailing list