File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -3448,29 +3448,6 @@ bool Optimizer::foldCmpToCondMod(G4_BB *bb, INST_LIST_ITER &iter) {
3448
3448
if (getUnsignedTy (T1) != getUnsignedTy (T2)) {
3449
3449
return false ;
3450
3450
}
3451
- if (!isSupportedCondModForLogicOp && T1 != T2) {
3452
- // If dst signedness of inst is not same as cmp src0, then only z/nz
3453
- // conditions can be evaluated correctly.
3454
- //
3455
- // If inst is a type-conversion mov then it's incorrect to use cmp src0
3456
- // type as mov dst type.
3457
- //
3458
- // mov A:d B:f // f->d mov
3459
- // cmp.gt P1 A:ud 0x0
3460
- //
3461
- // When folding cmp in the mov, we must preserve mov's dst type :d.
3462
- // Otherwise type-conversion semantics change which can lead to wrong
3463
- // result if f->d yields negative result.
3464
- //
3465
- // But if cmp used cmp.z/nz then folding is legal.
3466
- bool isDstSigned = IS_SIGNED_INT (T1);
3467
- bool isDstUnsigned = IS_SIGNED_INT (T1);
3468
- bool isSrcSigned = IS_SIGNED_INT (T2);
3469
- bool isSrcUnsigned = IS_SIGNED_INT (T2);
3470
- if (!(isDstSigned && isSrcSigned) && !(isDstUnsigned && isSrcUnsigned))
3471
- return false ;
3472
- }
3473
-
3474
3451
// Skip if the dst needs saturating but it's used as different sign.
3475
3452
if (inst->getSaturate () && T1 != T2) {
3476
3453
return false ;
You can’t perform that action at this time.
0 commit comments