30 lines · plain
1; RUN: opt -disable-output "-passes=print<scalar-evolution>" -scev-mulops-inline-threshold=1 < %s 2>&1 | FileCheck --check-prefix=CHECK1 %s2; RUN: opt -disable-output "-passes=print<scalar-evolution>" -scev-mulops-inline-threshold=10 < %s 2>&1 | FileCheck --check-prefix=CHECK10 %s3 4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"5target triple = "x86_64-unknown-linux-gnu"6 7@a = local_unnamed_addr global i32 0, align 48@b = local_unnamed_addr global i32 0, align 49 10define i32 @main() local_unnamed_addr {11 12; CHECK1: %mul.1 = mul nsw i32 %mul, %mul13; CHECK1: --> ((%a.promoted * %a.promoted) * (%a.promoted * %a.promoted))14 15; CHECK10: %mul.1 = mul nsw i32 %mul, %mul16; CHECK10: --> (%a.promoted * %a.promoted * %a.promoted * %a.promoted)17 18entry:19 %a.promoted = load i32, ptr @a, align 420 %mul = mul nsw i32 %a.promoted, %a.promoted21 %mul.1 = mul nsw i32 %mul, %mul22 %mul.2 = mul nsw i32 %mul.1, %mul.123 %mul.3 = mul nsw i32 %mul.2, %mul.224 %mul.4 = mul nsw i32 %mul.3, %mul.325 %mul.5 = mul nsw i32 %mul.4, %mul.426 store i32 %mul.5, ptr @a, align 427 store i32 31, ptr @b, align 428 ret i32 029}30