Passing the wrong values for predicate-clobbering. Simple to miss.
Added an assert to make this easier to catch in the future.
Details
- Reviewers
davidxl
Diff Detail
Event Timeline
The test case is related, because with the asserts, but without the fix, the test will fail.
It also makes sure that we are correctly re-scanning to find missed opportunities to if-convert.
lib/CodeGen/IfConversion.cpp | ||
---|---|---|
1758 | This assert would have made the failure occur earlier, making it more obvious what was wrong. | |
1984 | This is the mistake. It should be simple to see that it's correct now. |
In trying to reduce the test case, it seems that pred-clobbering instructions are comparitively rare, except before branches.
It wasn't even caught by any of the buildbots. It showed up compiling openssl for Arm V8 / thumb. It doesn't miscompile for arm V7 / thumb.
In any case, we now have a test that will catch it, and an assert.
lib/CodeGen/IfConversion.cpp | ||
---|---|---|
1984 | Yes. (Nor should it be) Those blocks will be scanned for other kinds of if-conversion, and it would be wrong to change TrueBBI and FalseBBI. |
This assert would have made the failure occur earlier, making it more obvious what was wrong.