This is a splice out from D52548 to add the test case that causes the instcombine fail, with the expected output pre-fixing it (notice the 0.0f's suddenly appearing because instcombine thinks it can optimize the div/rems away).
Details
Diff Detail
Event Timeline
test/Transforms/InstCombine/stop_bad_undef_propagation.ll | ||
---|---|---|
123–124 | Here and below: there are spacing glitches, so this doesn't compile. | |
127 | Here and in all tests: do we need fast-math-flags? | |
131 | It's not clear what different problems each of the 3 tests per opcode are demonstrating. Please add a comment at the top of the file or give the tests a meaningful name that describes what is changing between the tests. |
- Added a comment explaining each of the 3 variants for each of sdiv/srem/udiv/urem
- Fixed the whitespace issue
- Removed the FMF flags that were a legacy from the original shader this was reduced form
LGTM - I'll remove the block label to shrink this a bit, give the values real names (makes it easier to mix and match instructions if needed), and commit on your behalf. Thanks!
test/Transforms/InstCombine/stop_bad_undef_propagation.ll | ||
---|---|---|
147 | Not sure how you're generating this, but it still has at least 3 typos that prevent compilation. |
Here and below: there are spacing glitches, so this doesn't compile.