We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c358dd5 + 297d024 commit 6501f45Copy full SHA for 6501f45
1 file changed
backends/asm/optimize_ir.c
@@ -3710,7 +3710,7 @@ OptimizePeepholes(IRList *irl)
3710
if (test_is_z && InstrUsesFlags(testir, FLAG_WC)) {
3711
changeok = false;
3712
} else if (InstrSetsAnyFlags(testir)) {
3713
- changeok = sawir;
+ changeok = sawir && (test_is_c || !FlagsUsedAt(testir,FLAG_WZ));
3714
lastir = testir;
3715
break;
3716
}
@@ -3726,7 +3726,7 @@ OptimizePeepholes(IRList *irl)
3726
{
3727
ReplaceZWithNC(testir);
3728
3729
- if (IsBranch(lastir)) {
+ if (lastir != NULL && IsBranch(lastir)) {
3730
ReplaceZWithNC(lastir);
3731
3732
0 commit comments