@@ -311,8 +311,8 @@ define i8 @n14(i8 %x, i8 %y, i8 %z) {
311311
312312define i8 @neg_of_add_with_constant (i8 %x ) {
313313; CHECK-LABEL: @neg_of_add_with_constant(
314- ; CHECK-NEXT: [[S_NEG :%.*]] = sub i8 -42, [[X:%.*]]
315- ; CHECK-NEXT: ret i8 [[S_NEG ]]
314+ ; CHECK-NEXT: [[R :%.*]] = sub i8 -42, [[X:%.*]]
315+ ; CHECK-NEXT: ret i8 [[R ]]
316316;
317317 %s = add i8 %x , 42
318318 %r = sub i8 0 , %s
@@ -323,7 +323,7 @@ define i8 @neg_of_add_with_constant_multi_use(i8 %x) {
323323; CHECK-LABEL: @neg_of_add_with_constant_multi_use(
324324; CHECK-NEXT: [[S:%.*]] = add i8 [[X:%.*]], 42
325325; CHECK-NEXT: call void @use8(i8 [[S]])
326- ; CHECK-NEXT: [[R:%.*]] = sub i8 0 , [[S ]]
326+ ; CHECK-NEXT: [[R:%.*]] = sub i8 -42 , [[X ]]
327327; CHECK-NEXT: ret i8 [[R]]
328328;
329329 %s = add i8 %x , 42
@@ -1247,8 +1247,8 @@ define i8 @negate_left_shift_by_constant_extrause(i8 %x, i8 %y, i8 %z, i8 %k) {
12471247; `add` with single negatible operand is still negatible
12481248define i8 @negate_add_with_single_negatible_operand (i8 %x , i8 %y ) {
12491249; CHECK-LABEL: @negate_add_with_single_negatible_operand(
1250- ; CHECK-NEXT: [[T0_NEG :%.*]] = sub i8 -42, [[X:%.*]]
1251- ; CHECK-NEXT: ret i8 [[T0_NEG ]]
1250+ ; CHECK-NEXT: [[T1 :%.*]] = sub i8 -42, [[X:%.*]]
1251+ ; CHECK-NEXT: ret i8 [[T1 ]]
12521252;
12531253 %t0 = add i8 %x , 42
12541254 %t1 = sub i8 0 , %t0
@@ -1271,7 +1271,7 @@ define i8 @negate_add_with_single_negatible_operand_extrause(i8 %x, i8 %y) {
12711271; CHECK-LABEL: @negate_add_with_single_negatible_operand_extrause(
12721272; CHECK-NEXT: [[T0:%.*]] = add i8 [[X:%.*]], 42
12731273; CHECK-NEXT: call void @use8(i8 [[T0]])
1274- ; CHECK-NEXT: [[T1:%.*]] = sub i8 0 , [[T0 ]]
1274+ ; CHECK-NEXT: [[T1:%.*]] = sub i8 -42 , [[X ]]
12751275; CHECK-NEXT: ret i8 [[T1]]
12761276;
12771277 %t0 = add i8 %x , 42
0 commit comments