[PATCH] D71495: [SelectionDAG] Copy FP flags when visiting a binary instruction.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 11:26:15 PST 2019


spatel added a reviewer: mcberg2017.
spatel added a comment.

It's not clear to me where the bug is. I see this debug output:

  Detected a reduction operation:  %34 = fadd fast <4 x double> %vec.phi, %30
  Creating new node: t36: v4f64 = fadd vector-reduction t35, t30 <-- dropped all other FMF

So that seems like we just accidentally cleared FMF by setting vector-reduction. If so, then a better fix would be after line 3127?

  if (isVectorReductionOp(&I)) {
    Flags.setVectorReduction(true);
    LLVM_DEBUG(dbgs() << "Detected a reduction operation:" << I << "\n");
  }

Reducing the test case would be good - no need to unroll 4x vector.body?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71495/new/

https://reviews.llvm.org/D71495





More information about the llvm-commits mailing list