[all-commits] [llvm/llvm-project] 81ee48: [FPEnv] Fix chain handling regression after 04a8696

Ulrich Weigand via All-commits all-commits at lists.llvm.org
Tue Jan 14 05:11:15 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 81ee484484a0be59da8f749a9b4cf56bb8d37402
      https://github.com/llvm/llvm-project/commit/81ee484484a0be59da8f749a9b4cf56bb8d37402
  Author: Ulrich Weigand <ulrich.weigand at de.ibm.com>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
    M llvm/test/CodeGen/SystemZ/fp-strict-alias.ll

  Log Message:
  -----------
  [FPEnv] Fix chain handling regression after 04a8696

Code in getRoot made the assumption that every node in PendingLoads
must always itself have a dependency on the current DAG root node.

After the changes in 04a8696, it turns out that this assumption no
longer holds true, causing wrong codegen in some cases (e.g. stores
after constrained FP intrinsics might get deleted).

To fix this, we now need to make sure that the TokenFactor created
by getRoot always includes the previous root, if there is no implicit
dependency already present.

The original getControlRoot code already has exactly this check,
so this patch simply reuses that code now for getRoot as well.
This fixes the regression.

NFC if no constrained FP intrinsic is present.




More information about the All-commits mailing list