[PATCH] D43079: [TTI CostModel] change default cost of FP ops to 1 (PR36280)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 04:10:15 PST 2018


RKSimon added a comment.

Wouldn't we be better off avoiding affecting generic targets and just adding tuned FADD/FSUB/FMUL costs to getArithmeticInstrCost in X86TargetTransformInfo.cpp? The general rule we used for FDIV/FSQRT was to use the 'worst hardware' cost for a given SSE level - so AVX1 (SB/JG) might have a better cost than SSE42 (https://reviews.llvm.org/P4) etc. which seemed to work pretty well.

If we go that route we might want to add extra cpu targets to some of the x86 slp tests.



================
Comment at: test/Transforms/SLPVectorizer/X86/PR36280.ll:4
 
+; It is not profitable to vectorize this with [2 x float] ops.
+
----------------
It'd probably be useful to include a comment that this code snippet is from the himeno benchmark? 


https://reviews.llvm.org/D43079





More information about the llvm-commits mailing list