Skip to content

Commit 6823631

Browse files
committed
revert add cannonlization to sub in true16
1 parent eb34679 commit 6823631

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
@@ -1271,7 +1271,11 @@ let True16Predicate = NotHasTrue16BitInsts, SubtargetPredicate = isGFX10Plus in
12711271
let True16Predicate = UseRealTrue16Insts in {
12721272
def : OpSelBinOpClampPat<uaddsat, V_ADD_NC_U16_t16_e64>;
12731273
def : OpSelBinOpClampPat<usubsat, V_SUB_NC_U16_t16_e64>;
1274-
} // End OtherPredicates = [UseRealTrue16Insts]
1274+
def : GCNPat<
1275+
(add i16:$src0, (i16 NegSubInlineIntConst16:$src1)),
1276+
(V_SUB_NC_U16_t16_e64 0, VSrc_b16:$src0, 0, NegSubInlineIntConst16:$src1, 0, 0)
1277+
>;
1278+
} // End True16Predicate = UseRealTrue16Insts
12751279

12761280
let True16Predicate = UseFakeTrue16Insts in {
12771281
def : OpSelBinOpClampPat<uaddsat, V_ADD_NC_U16_fake16_e64>;

0 commit comments

Comments
 (0)