[PATCH] D113125: [LoopVectorize] Propagate fast-math flags for VPInstruction
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 3 12:02:14 PDT 2021
fhahn added reviewers: Ayal, gilr.
fhahn added a comment.
In D113125#3106989 <https://reviews.llvm.org/D113125#3106989>, @dmgreen wrote:
> What happens when the instruction is printed inside VPInstruction::print? Can (should?) we get it to display the fast math flags?
Yeah, I think the flags should be handled in `::print` and it would be good to also add a test in `llvm/test/Transforms/LoopVectorize/vplan-printing.ll`
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:876
+ // Set the fast-math flags.
+ void setFastMathFlags(FastMathFlags FMFNew) { FMF = FMFNew; }
};
----------------
can we assert that this is only used for opcodes that can take fast-math flags? On the IR side this is done by checking for `FPMathOperator`, but there's no helper to check if an opcode is a FP operation. Perhaps it would be sufficient to check for the relevant opcodes?
Also, for now we only need to set fast-math flags at construction time I think, so could this be set directly in the constructor?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113125/new/
https://reviews.llvm.org/D113125
More information about the llvm-commits
mailing list