HomePhabricator

[FPEnv] Fix chain handling regression after 04a8696

Authored by uweigand on Jan 14 2020, 5:04 AM.

Description

[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.

Details

Committed
uweigandJan 14 2020, 5:10 AM
Parents
rGdf186507e1d0: Make helper functions static or move them into anonymous namespaces. NFC.
Branches
Unknown
Tags
Unknown