76 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s "-passes=print<scalar-evolution>" -disable-output 2>&1 | FileCheck %s3 4define i8 @test(i8 %x, i8 %y) {5; CHECK-LABEL: 'test'6; CHECK-NEXT: Classifying expressions for: @test7; CHECK-NEXT: %udiv = udiv i8 %x, %y8; CHECK-NEXT: --> (%x /u %y) U: full-set S: full-set9; CHECK-NEXT: %res = mul i8 %udiv, %y10; CHECK-NEXT: --> ((%x /u %y) * %y)<nuw> U: full-set S: full-set11; CHECK-NEXT: Determining loop execution counts for: @test12;13 %udiv = udiv i8 %x, %y14 %res = mul i8 %udiv, %y15 ret i8 %res16}17 18define i8 @test2(i8 %x) {19; CHECK-LABEL: 'test2'20; CHECK-NEXT: Classifying expressions for: @test221; CHECK-NEXT: %udiv = udiv i8 %x, 222; CHECK-NEXT: --> (%x /u 2) U: [0,-128) S: [0,-128)23; CHECK-NEXT: %res = mul i8 %udiv, 224; CHECK-NEXT: --> (2 * (%x /u 2))<nuw> U: [0,-1) S: [-128,127)25; CHECK-NEXT: Determining loop execution counts for: @test226;27 %udiv = udiv i8 %x, 228 %res = mul i8 %udiv, 229 ret i8 %res30}31 32define i8 @test3(i8 %x) {33; CHECK-LABEL: 'test3'34; CHECK-NEXT: Classifying expressions for: @test335; CHECK-NEXT: %udiv = udiv i8 %x, -12836; CHECK-NEXT: --> (%x /u -128) U: [0,2) S: [0,2)37; CHECK-NEXT: %res = mul i8 %udiv, -12838; CHECK-NEXT: --> (-128 * (%x /u -128))<nuw><nsw> U: [0,-127) S: [-128,1)39; CHECK-NEXT: Determining loop execution counts for: @test340;41 %udiv = udiv i8 %x, 12842 %res = mul i8 %udiv, 12843 ret i8 %res44}45 46define i8 @test4(i8 %x) {47; CHECK-LABEL: 'test4'48; CHECK-NEXT: Classifying expressions for: @test449; CHECK-NEXT: %udiv = udiv i8 %x, -150; CHECK-NEXT: --> (%x /u -1) U: [0,2) S: [0,2)51; CHECK-NEXT: %res = mul i8 %udiv, -152; CHECK-NEXT: --> (-1 * (%x /u -1))<nuw><nsw> U: [-1,1) S: [-1,1)53; CHECK-NEXT: Determining loop execution counts for: @test454;55 %udiv = udiv i8 %x, 25556 %res = mul i8 %udiv, 25557 ret i8 %res58}59 60define i8 @test5(i8 %x, i32 %y32) {61; CHECK-LABEL: 'test5'62; CHECK-NEXT: Classifying expressions for: @test563; CHECK-NEXT: %y = trunc i32 %y32 to i864; CHECK-NEXT: --> (trunc i32 %y32 to i8) U: full-set S: full-set65; CHECK-NEXT: %udiv = udiv i8 %x, %y66; CHECK-NEXT: --> (%x /u (trunc i32 %y32 to i8)) U: full-set S: full-set67; CHECK-NEXT: %res = mul i8 %udiv, %y68; CHECK-NEXT: --> ((trunc i32 %y32 to i8) * (%x /u (trunc i32 %y32 to i8)))<nuw> U: full-set S: full-set69; CHECK-NEXT: Determining loop execution counts for: @test570;71 %y = trunc i32 %y32 to i872 %udiv = udiv i8 %x, %y73 %res = mul i8 %udiv, %y74 ret i8 %res75}76