[PATCH] D146494: [X86] Combine constant vector inputs for FMA
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 15 19:37:36 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:54517
+ // the first place.
+ for (auto op : V->op_values()) {
+ if (auto *Cst = dyn_cast<ConstantFPSDNode>(op)) {
----------------
e-kud wrote:
> craig.topper wrote:
> > llvm::any_of
> I don't think that `any_of` is much better here. We need to stop traversing after the first non-undef value (this is controlled by return value of the lambda) and return `true` or `false` (using a variable from context). Then we generally ignore return result of `any_of` and use only the variable with the result. It looks artificial to me. Probably I'm missing something.
>
> Added an extra comment here.
Oops. I think I missed the break statement.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146494/new/
https://reviews.llvm.org/D146494
More information about the llvm-commits
mailing list