Skip to content

Commit 39945e0

Browse files
bcheng0127igcbot
authored andcommitted
Changes in code.
1 parent 6426d94 commit 39945e0

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

visa/Optimizer.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3448,29 +3448,6 @@ bool Optimizer::foldCmpToCondMod(G4_BB *bb, INST_LIST_ITER &iter) {
34483448
if (getUnsignedTy(T1) != getUnsignedTy(T2)) {
34493449
return false;
34503450
}
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-
34743451
// Skip if the dst needs saturating but it's used as different sign.
34753452
if (inst->getSaturate() && T1 != T2) {
34763453
return false;

0 commit comments

Comments
 (0)