@@ -432,17 +432,13 @@ define void @minimal_bit_widths(i1 %c) {
432
432
; UNROLL-NEXT: [[TMP5:%.*]] = load i8, ptr [[TMP3]], align 1
433
433
; UNROLL-NEXT: br i1 [[C:%.*]], label [[PRED_STORE_IF:%.*]], label [[PRED_STORE_CONTINUE3]]
434
434
; UNROLL: pred.store.if:
435
- ; UNROLL-NEXT: [[TMP6:%.*]] = zext i8 [[TMP4]] to i32
436
- ; UNROLL-NEXT: [[TMP7:%.*]] = trunc i32 [[TMP6]] to i8
437
- ; UNROLL-NEXT: store i8 [[TMP7]], ptr [[TMP2]], align 1
438
- ; UNROLL-NEXT: [[TMP8:%.*]] = zext i8 [[TMP5]] to i32
439
- ; UNROLL-NEXT: [[TMP9:%.*]] = trunc i32 [[TMP8]] to i8
440
- ; UNROLL-NEXT: store i8 [[TMP9]], ptr [[TMP3]], align 1
435
+ ; UNROLL-NEXT: store i8 [[TMP4]], ptr [[TMP2]], align 1
436
+ ; UNROLL-NEXT: store i8 [[TMP5]], ptr [[TMP3]], align 1
441
437
; UNROLL-NEXT: br label [[PRED_STORE_CONTINUE3]]
442
438
; UNROLL: pred.store.continue3:
443
439
; UNROLL-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 2
444
- ; UNROLL-NEXT: [[TMP10 :%.*]] = icmp eq i64 [[INDEX_NEXT]], 1000
445
- ; UNROLL-NEXT: br i1 [[TMP10 ]], label [[FOR_END:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP4:![0-9]+]]
440
+ ; UNROLL-NEXT: [[TMP6 :%.*]] = icmp eq i64 [[INDEX_NEXT]], 1000
441
+ ; UNROLL-NEXT: br i1 [[TMP6 ]], label [[FOR_END:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP4:![0-9]+]]
446
442
; UNROLL: for.end:
447
443
; UNROLL-NEXT: ret void
448
444
;
@@ -461,21 +457,17 @@ define void @minimal_bit_widths(i1 %c) {
461
457
; UNROLL-NOSIMPLIFY-NEXT: [[TMP5:%.*]] = load i8, ptr [[TMP3]], align 1
462
458
; UNROLL-NOSIMPLIFY-NEXT: br i1 [[C:%.*]], label [[PRED_STORE_IF:%.*]], label [[PRED_STORE_CONTINUE:%.*]]
463
459
; UNROLL-NOSIMPLIFY: pred.store.if:
464
- ; UNROLL-NOSIMPLIFY-NEXT: [[TMP6:%.*]] = zext i8 [[TMP4]] to i32
465
- ; UNROLL-NOSIMPLIFY-NEXT: [[TMP7:%.*]] = trunc i32 [[TMP6]] to i8
466
- ; UNROLL-NOSIMPLIFY-NEXT: store i8 [[TMP7]], ptr [[TMP2]], align 1
460
+ ; UNROLL-NOSIMPLIFY-NEXT: store i8 [[TMP4]], ptr [[TMP2]], align 1
467
461
; UNROLL-NOSIMPLIFY-NEXT: br label [[PRED_STORE_CONTINUE]]
468
462
; UNROLL-NOSIMPLIFY: pred.store.continue:
469
463
; UNROLL-NOSIMPLIFY-NEXT: br i1 [[C]], label [[PRED_STORE_IF2:%.*]], label [[PRED_STORE_CONTINUE3]]
470
464
; UNROLL-NOSIMPLIFY: pred.store.if2:
471
- ; UNROLL-NOSIMPLIFY-NEXT: [[TMP8:%.*]] = zext i8 [[TMP5]] to i32
472
- ; UNROLL-NOSIMPLIFY-NEXT: [[TMP9:%.*]] = trunc i32 [[TMP8]] to i8
473
- ; UNROLL-NOSIMPLIFY-NEXT: store i8 [[TMP9]], ptr [[TMP3]], align 1
465
+ ; UNROLL-NOSIMPLIFY-NEXT: store i8 [[TMP5]], ptr [[TMP3]], align 1
474
466
; UNROLL-NOSIMPLIFY-NEXT: br label [[PRED_STORE_CONTINUE3]]
475
467
; UNROLL-NOSIMPLIFY: pred.store.continue3:
476
468
; UNROLL-NOSIMPLIFY-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 2
477
- ; UNROLL-NOSIMPLIFY-NEXT: [[TMP10 :%.*]] = icmp eq i64 [[INDEX_NEXT]], 1000
478
- ; UNROLL-NOSIMPLIFY-NEXT: br i1 [[TMP10 ]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP6:![0-9]+]]
469
+ ; UNROLL-NOSIMPLIFY-NEXT: [[TMP6 :%.*]] = icmp eq i64 [[INDEX_NEXT]], 1000
470
+ ; UNROLL-NOSIMPLIFY-NEXT: br i1 [[TMP6 ]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP6:![0-9]+]]
479
471
; UNROLL-NOSIMPLIFY: middle.block:
480
472
; UNROLL-NOSIMPLIFY-NEXT: br i1 true, label [[FOR_END:%.*]], label [[SCALAR_PH]]
481
473
; UNROLL-NOSIMPLIFY: scalar.ph:
@@ -515,27 +507,23 @@ define void @minimal_bit_widths(i1 %c) {
515
507
; VEC-NEXT: [[TMP3:%.*]] = extractelement <2 x i1> [[BROADCAST_SPLAT]], i32 0
516
508
; VEC-NEXT: br i1 [[TMP3]], label [[PRED_STORE_IF:%.*]], label [[PRED_STORE_CONTINUE:%.*]]
517
509
; VEC: pred.store.if:
518
- ; VEC-NEXT: [[TMP4:%.*]] = extractelement <2 x i8> [[WIDE_LOAD]], i32 0
519
- ; VEC-NEXT: [[TMP5:%.*]] = zext i8 [[TMP4]] to i32
520
- ; VEC-NEXT: [[TMP6:%.*]] = getelementptr i8, ptr undef, i64 [[TMP0]]
521
- ; VEC-NEXT: [[TMP7:%.*]] = trunc i32 [[TMP5]] to i8
522
- ; VEC-NEXT: store i8 [[TMP7]], ptr [[TMP6]], align 1
510
+ ; VEC-NEXT: [[TMP4:%.*]] = getelementptr i8, ptr undef, i64 [[TMP0]]
511
+ ; VEC-NEXT: [[TMP5:%.*]] = extractelement <2 x i8> [[WIDE_LOAD]], i32 0
512
+ ; VEC-NEXT: store i8 [[TMP5]], ptr [[TMP4]], align 1
523
513
; VEC-NEXT: br label [[PRED_STORE_CONTINUE]]
524
514
; VEC: pred.store.continue:
525
- ; VEC-NEXT: [[TMP8 :%.*]] = extractelement <2 x i1> [[BROADCAST_SPLAT]], i32 1
526
- ; VEC-NEXT: br i1 [[TMP8 ]], label [[PRED_STORE_IF2:%.*]], label [[PRED_STORE_CONTINUE3]]
515
+ ; VEC-NEXT: [[TMP6 :%.*]] = extractelement <2 x i1> [[BROADCAST_SPLAT]], i32 1
516
+ ; VEC-NEXT: br i1 [[TMP6 ]], label [[PRED_STORE_IF2:%.*]], label [[PRED_STORE_CONTINUE3]]
527
517
; VEC: pred.store.if2:
528
- ; VEC-NEXT: [[TMP9:%.*]] = add i64 [[INDEX]], 1
529
- ; VEC-NEXT: [[TMP10:%.*]] = extractelement <2 x i8> [[WIDE_LOAD]], i32 1
530
- ; VEC-NEXT: [[TMP11:%.*]] = zext i8 [[TMP10]] to i32
531
- ; VEC-NEXT: [[TMP12:%.*]] = getelementptr i8, ptr undef, i64 [[TMP9]]
532
- ; VEC-NEXT: [[TMP13:%.*]] = trunc i32 [[TMP11]] to i8
533
- ; VEC-NEXT: store i8 [[TMP13]], ptr [[TMP12]], align 1
518
+ ; VEC-NEXT: [[TMP7:%.*]] = add i64 [[INDEX]], 1
519
+ ; VEC-NEXT: [[TMP8:%.*]] = getelementptr i8, ptr undef, i64 [[TMP7]]
520
+ ; VEC-NEXT: [[TMP9:%.*]] = extractelement <2 x i8> [[WIDE_LOAD]], i32 1
521
+ ; VEC-NEXT: store i8 [[TMP9]], ptr [[TMP8]], align 1
534
522
; VEC-NEXT: br label [[PRED_STORE_CONTINUE3]]
535
523
; VEC: pred.store.continue3:
536
524
; VEC-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 2
537
- ; VEC-NEXT: [[TMP14 :%.*]] = icmp eq i64 [[INDEX_NEXT]], 1000
538
- ; VEC-NEXT: br i1 [[TMP14 ]], label [[FOR_END:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP4:![0-9]+]]
525
+ ; VEC-NEXT: [[TMP10 :%.*]] = icmp eq i64 [[INDEX_NEXT]], 1000
526
+ ; VEC-NEXT: br i1 [[TMP10 ]], label [[FOR_END:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP4:![0-9]+]]
539
527
; VEC: for.end:
540
528
; VEC-NEXT: ret void
541
529
;
@@ -606,21 +594,17 @@ define void @minimal_bit_widths_with_aliasing_store(i1 %c, ptr %ptr) {
606
594
; UNROLL-NOSIMPLIFY-NEXT: store i8 0, ptr [[TMP3]], align 1
607
595
; UNROLL-NOSIMPLIFY-NEXT: br i1 [[C:%.*]], label [[PRED_STORE_IF:%.*]], label [[PRED_STORE_CONTINUE:%.*]]
608
596
; UNROLL-NOSIMPLIFY: pred.store.if:
609
- ; UNROLL-NOSIMPLIFY-NEXT: [[TMP6:%.*]] = zext i8 [[TMP4]] to i32
610
- ; UNROLL-NOSIMPLIFY-NEXT: [[TMP7:%.*]] = trunc i32 [[TMP6]] to i8
611
- ; UNROLL-NOSIMPLIFY-NEXT: store i8 [[TMP7]], ptr [[TMP2]], align 1
597
+ ; UNROLL-NOSIMPLIFY-NEXT: store i8 [[TMP4]], ptr [[TMP2]], align 1
612
598
; UNROLL-NOSIMPLIFY-NEXT: br label [[PRED_STORE_CONTINUE]]
613
599
; UNROLL-NOSIMPLIFY: pred.store.continue:
614
600
; UNROLL-NOSIMPLIFY-NEXT: br i1 [[C]], label [[PRED_STORE_IF2:%.*]], label [[PRED_STORE_CONTINUE3]]
615
601
; UNROLL-NOSIMPLIFY: pred.store.if2:
616
- ; UNROLL-NOSIMPLIFY-NEXT: [[TMP8:%.*]] = zext i8 [[TMP5]] to i32
617
- ; UNROLL-NOSIMPLIFY-NEXT: [[TMP9:%.*]] = trunc i32 [[TMP8]] to i8
618
- ; UNROLL-NOSIMPLIFY-NEXT: store i8 [[TMP9]], ptr [[TMP3]], align 1
602
+ ; UNROLL-NOSIMPLIFY-NEXT: store i8 [[TMP5]], ptr [[TMP3]], align 1
619
603
; UNROLL-NOSIMPLIFY-NEXT: br label [[PRED_STORE_CONTINUE3]]
620
604
; UNROLL-NOSIMPLIFY: pred.store.continue3:
621
605
; UNROLL-NOSIMPLIFY-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 2
622
- ; UNROLL-NOSIMPLIFY-NEXT: [[TMP10 :%.*]] = icmp eq i64 [[INDEX_NEXT]], 0
623
- ; UNROLL-NOSIMPLIFY-NEXT: br i1 [[TMP10 ]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP8:![0-9]+]]
606
+ ; UNROLL-NOSIMPLIFY-NEXT: [[TMP6 :%.*]] = icmp eq i64 [[INDEX_NEXT]], 0
607
+ ; UNROLL-NOSIMPLIFY-NEXT: br i1 [[TMP6 ]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP8:![0-9]+]]
624
608
; UNROLL-NOSIMPLIFY: middle.block:
625
609
; UNROLL-NOSIMPLIFY-NEXT: br i1 true, label [[FOR_END:%.*]], label [[SCALAR_PH]]
626
610
; UNROLL-NOSIMPLIFY: scalar.ph:
0 commit comments