[PATCH] D33863: [DAGComine] (fadd x, undef) -> undef and (fmul x, undef) -> undef

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 10:38:32 PDT 2017


deadalnix added a comment.

1. My best guess is that it is an oversight, but there would be a reason I'm not aware of.
2. Yes because of legalization.
3. The problem i intended to solve was the (fadd constant, undef) where it gets flipped again and again. fsub and fdiv/frem are not commutative ops so that problem doesn't occur with them.

As for bugpoint, I don't think it hinder its functioning, in fact this folding is already done for add for instance. However, it may have reduced cases with undef that will now get folded and so these test case may not test what's intended anymore. But that's more or less true of any transform.


https://reviews.llvm.org/D33863





More information about the llvm-commits mailing list