@@ -311,8 +311,8 @@ define i8 @n14(i8 %x, i8 %y, i8 %z) {
311
311
312
312
define i8 @neg_of_add_with_constant (i8 %x ) {
313
313
; 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 ]]
316
316
;
317
317
%s = add i8 %x , 42
318
318
%r = sub i8 0 , %s
@@ -323,7 +323,7 @@ define i8 @neg_of_add_with_constant_multi_use(i8 %x) {
323
323
; CHECK-LABEL: @neg_of_add_with_constant_multi_use(
324
324
; CHECK-NEXT: [[S:%.*]] = add i8 [[X:%.*]], 42
325
325
; CHECK-NEXT: call void @use8(i8 [[S]])
326
- ; CHECK-NEXT: [[R:%.*]] = sub i8 0 , [[S ]]
326
+ ; CHECK-NEXT: [[R:%.*]] = sub i8 -42 , [[X ]]
327
327
; CHECK-NEXT: ret i8 [[R]]
328
328
;
329
329
%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) {
1247
1247
; `add` with single negatible operand is still negatible
1248
1248
define i8 @negate_add_with_single_negatible_operand (i8 %x , i8 %y ) {
1249
1249
; 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 ]]
1252
1252
;
1253
1253
%t0 = add i8 %x , 42
1254
1254
%t1 = sub i8 0 , %t0
@@ -1271,7 +1271,7 @@ define i8 @negate_add_with_single_negatible_operand_extrause(i8 %x, i8 %y) {
1271
1271
; CHECK-LABEL: @negate_add_with_single_negatible_operand_extrause(
1272
1272
; CHECK-NEXT: [[T0:%.*]] = add i8 [[X:%.*]], 42
1273
1273
; CHECK-NEXT: call void @use8(i8 [[T0]])
1274
- ; CHECK-NEXT: [[T1:%.*]] = sub i8 0 , [[T0 ]]
1274
+ ; CHECK-NEXT: [[T1:%.*]] = sub i8 -42 , [[X ]]
1275
1275
; CHECK-NEXT: ret i8 [[T1]]
1276
1276
;
1277
1277
%t0 = add i8 %x , 42
0 commit comments