This change uses fmf subflags to guard optimizations as well as unsafe. These changes originated from D46483.
Details
Diff Detail
Event Timeline
This review only contains one context, namely fneg. Please comment if needed, otherwise perhaps we can proceed.
lib/CodeGen/SelectionDAG/SelectionDAG.cpp | ||
---|---|---|
4052–4053 | The FIXME comment is stale, and it should be removed. The fneg does have FMF to propagate, but we're not doing that here, and that's a mistake visible in the test case. | |
test/CodeGen/PowerPC/fmf-propagation.ll | ||
39–49 | Please add this test as an NFC preliminary commit. That way, we won't have the constant pool noise in the unrelated tests. You might also just want to put this test at the bottom of the file to avoid that noise. |
Cleanup up code. Move test to bottom of lit test file, staged initial fneg_fsub test and checked in, with modifications here.
There's still an open question about why we're doing folds like this in getNode(), but I guess we'll answer that in another patch.
LGTM.
The FIXME comment is stale, and it should be removed.
The fneg does have FMF to propagate, but we're not doing that here, and that's a mistake visible in the test case.