Skip to content
Commit 2ccbf3db authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[SDAG] fold x * 0.0 at node creation time

In the motivating case from https://llvm.org/PR47517
we create a node that does not get constant folded
before getNegatedExpression is attempted from some
other node, and we crash.

By moving the fold into SelectionDAG::simplifyFPBinop(),
we get the constant fold sooner and avoid the problem.
parent 2c48dd7c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment