Skip to content

Commit 732e319

Browse files
committed
revert add cannonlization to sub in true16
1 parent 1a7d46f commit 732e319

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

llvm/lib/Target/AMDGPU/VOP3Instructions.td

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,11 @@ let True16Predicate = NotHasTrue16BitInsts, SubtargetPredicate = isGFX10Plus in
12741274
let True16Predicate = UseRealTrue16Insts in {
12751275
def : OpSelBinOpClampPat<uaddsat, V_ADD_NC_U16_t16_e64>;
12761276
def : OpSelBinOpClampPat<usubsat, V_SUB_NC_U16_t16_e64>;
1277-
} // End OtherPredicates = [UseRealTrue16Insts]
1277+
def : GCNPat<
1278+
(add i16:$src0, (i16 NegSubInlineIntConst16:$src1)),
1279+
(V_SUB_NC_U16_t16_e64 0, VSrc_b16:$src0, 0, NegSubInlineIntConst16:$src1, 0, 0)
1280+
>;
1281+
} // End True16Predicate = UseRealTrue16Insts
12781282

12791283
let True16Predicate = UseFakeTrue16Insts in {
12801284
def : OpSelBinOpClampPat<uaddsat, V_ADD_NC_U16_fake16_e64>;

0 commit comments

Comments
 (0)