[PATCH] D98934: [SVE] Add instruction cost for fptrunc in loops
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 19 02:48:02 PDT 2021
david-arm added inline comments.
================
Comment at: llvm/test/CodeGen/AArch64/fptrunc-cost.ll:17
+
+for.body.preheader: ; preds = %entry
+ br label %for.body
----------------
sdesmalen wrote:
> I think you may be able to write the test very similar to what was done in D97758, where you can invoke the cost-model directly on the fptrunc operation.
> Or is there a specific reason that invoking the loop-vectorizer is required here?
I think that `opt -cost-model -analyze` doesn't crash because it calculates the cost in a different way. The loop vectoriser decides to do things "differently" by passing the fptrunc op to the getCastInstrCost function. :(
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98934/new/
https://reviews.llvm.org/D98934
More information about the llvm-commits
mailing list