brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 1b37b4c Raw
66 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 32; RUN: opt < %s -loop-reduce -S | FileCheck %s3; REQUIRES: x86-registered-target4 5target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"6target triple = "x86_64-unknown-linux-gnu"7 8; The returned value should be equal to9;     zext (%phi-1) to i6410; or simply 1209.11define noundef i64 @test() {12; CHECK-LABEL: define noundef i64 @test() {13; CHECK-NEXT:  bb2:14; CHECK-NEXT:    br label [[BB3:%.*]]15; CHECK:       bb3:16; CHECK-NEXT:    [[LSR_IV:%.*]] = phi i32 [ [[LSR_IV_NEXT:%.*]], [[BB10:%.*]] ], [ -1, [[BB2:%.*]] ]17; CHECK-NEXT:    [[TMP0:%.*]] = add i32 [[LSR_IV]], 6553618; CHECK-NEXT:    [[AND:%.*]] = and i32 [[TMP0]], 6553519; CHECK-NEXT:    [[ZEXT:%.*]] = zext i32 [[AND]] to i6420; CHECK-NEXT:    [[ADD4:%.*]] = add nsw i64 [[ZEXT]], -12821; CHECK-NEXT:    [[ICMP5:%.*]] = icmp ult i64 [[ADD4]], -25622; CHECK-NEXT:    [[ICMP6:%.*]] = icmp ult i32 [[AND]], 12823; CHECK-NEXT:    [[OR:%.*]] = or i1 [[ICMP5]], [[ICMP6]]24; CHECK-NEXT:    br i1 [[OR]], label [[BB10]], label [[BB7:%.*]]25; CHECK:       bb7:26; CHECK-NEXT:    [[TMP1:%.*]] = add i32 [[LSR_IV]], 127; CHECK-NEXT:    call void @foo(i32 [[TMP1]])28; CHECK-NEXT:    unreachable29; CHECK:       bb10:30; CHECK-NEXT:    [[LSR_IV_NEXT]] = add nsw i32 [[LSR_IV]], 131; CHECK-NEXT:    [[ICMP12:%.*]] = icmp ult i32 [[LSR_IV_NEXT]], 121032; CHECK-NEXT:    br i1 [[ICMP12]], label [[BB3]], label [[BB13:%.*]]33; CHECK:       bb13:34; CHECK-NEXT:    ret i64 [[ZEXT]]35;36bb2:37  br label %bb338 39bb3:                                              ; preds = %bb10, %bb240  %phi = phi i32 [ 0, %bb2 ], [ %add11, %bb10 ]41  %add = add nuw nsw i32 %phi, 6553542  %and = and i32 %add, 6553543  %zext = zext i32 %and to i6444  %add4 = add nsw i64 %zext, -12845  %icmp5 = icmp ult i64 %add4, -25646  %icmp6 = icmp ult i32 %and, 12847  %or = or i1 %icmp5, %icmp648  br i1 %or, label %bb10, label %bb749 50bb7:                                              ; preds = %bb351  call void @foo(i32 %phi)52  unreachable53 54bb10:                                             ; preds = %bb355  %add11 = add nuw nsw i32 %phi, 156  %icmp12 = icmp ult i32 %phi, 121057  br i1 %icmp12, label %bb3, label %bb1358 59bb13:                                             ; preds = %bb1060  ret i64 %zext61 62  uselistorder i32 %phi, { 0, 3, 1, 2 }63}64 65declare void @foo(i32)66