Performing this optimization duplicates the call to the convergent
function and adds new control-flow dependencies, which is a no-no.
Details
Details
Diff Detail
Diff Detail
Event Timeline
test/Transforms/SimplifyCFG/attr-convergent.ll | ||
---|---|---|
21 | This test doesn't directly reflect your change because %cmp is not a PHINode. In fact, SimplifyCFG optimizes %cmp to PHINode before it worries about whether @barrier is convergent. It would be more straight-forward to write a test where the containing block of @barrier directly branches at a PHINode directly. |
This test doesn't directly reflect your change because %cmp is not a PHINode. In fact, SimplifyCFG optimizes %cmp to PHINode before it worries about whether @barrier is convergent.
It would be more straight-forward to write a test where the containing block of @barrier directly branches at a PHINode directly.