[PATCH] D51267: [X86] Correct the cost of (v4i32 (fptoui (v4f64))) under AVX512F.

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 26 11:48:40 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL340708: [X86] Correct the cost of (v4i32 (fptoui (v4f64))) under AVX512F. (authored by ctopper, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D51267

Files:
  llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
  llvm/trunk/test/Analysis/CostModel/X86/fptoui.ll


Index: llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
+++ llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -1237,6 +1237,7 @@
 
     { ISD::FP_TO_UINT,  MVT::v2i32,  MVT::v2f32,  1 },
     { ISD::FP_TO_UINT,  MVT::v4i32,  MVT::v4f32,  1 },
+    { ISD::FP_TO_UINT,  MVT::v4i32,  MVT::v4f64,  1 },
     { ISD::FP_TO_UINT,  MVT::v8i32,  MVT::v8f32,  1 },
     { ISD::FP_TO_UINT,  MVT::v8i16,  MVT::v8f64,  2 },
     { ISD::FP_TO_UINT,  MVT::v8i8,   MVT::v8f64,  2 },
Index: llvm/trunk/test/Analysis/CostModel/X86/fptoui.ll
===================================================================
--- llvm/trunk/test/Analysis/CostModel/X86/fptoui.ll
+++ llvm/trunk/test/Analysis/CostModel/X86/fptoui.ll
@@ -71,14 +71,14 @@
 ; AVX512F-LABEL: 'fptoui_double_i32'
 ; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32
 ; AVX512F-NEXT:  Cost Model: Found an estimated cost of 6 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32>
-; AVX512F-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32>
+; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32>
 ; AVX512F-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32>
 ; AVX512F-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
 ;
 ; AVX512DQ-LABEL: 'fptoui_double_i32'
 ; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %I32 = fptoui double undef to i32
 ; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V2I32 = fptoui <2 x double> undef to <2 x i32>
-; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 16 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32>
+; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = fptoui <4 x double> undef to <4 x i32>
 ; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = fptoui <8 x double> undef to <8 x i32>
 ; AVX512DQ-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
 ;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51267.162590.patch
Type: text/x-patch
Size: 2335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180826/cc1c0eb4/attachment.bin>


More information about the llvm-commits mailing list