[PATCH] D29265: [legalize-types] Remove stale entries from SoftenedFloats.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 09:33:06 PST 2017

fhahn added a comment.

In https://reviews.llvm.org/D29265#663124, @hfinkel wrote:

> In https://reviews.llvm.org/D29265#663071, @fhahn wrote:
> > @hfinkel Thanks again for the review Hal. Any chance you could also have a look at https://reviews.llvm.org/D29265, which also deals with type legalization?
> I don't quite understand what's going on here. Can we visit a node, decide it needs to be a softened float, and then visit it again and make a different decision? Can't we already have used the result from the map?

For the X86 fp128 tests, the following is going on as far as I understand:

There is a node `t9: f128 = select t8, t2, t4`. During legalization of this node the following happens

- the result is softened
- the operands are scanned
- One integer operand is promoted
- The node has to be re-analyzed again, which means it's marked as NewNode again
- On the next iteration of the main loop, PerformExpensiveChecks fails because the result of  `t9: f128 = select t8, t2, t4` has been added to SoftenedFloats, but the node isn't marked as Processed yet.

But after thinking about it a little more I feel like there should be a better solution than my patch.


More information about the llvm-commits mailing list