1; RUN: opt -analyze -enable-new-pm=0 -scalar-evolution -scev-mulops-inline-threshold=1 < %s | FileCheck --check-prefix=CHECK1 %s 2; RUN: opt -disable-output "-passes=print<scalar-evolution>" -scev-mulops-inline-threshold=1 < %s 2>&1 | FileCheck --check-prefix=CHECK1 %s 3; RUN: opt -analyze -enable-new-pm=0 -scalar-evolution -scev-mulops-inline-threshold=10 < %s | FileCheck --check-prefix=CHECK10 %s 4; RUN: opt -disable-output "-passes=print<scalar-evolution>" -scev-mulops-inline-threshold=10 < %s 2>&1 | FileCheck --check-prefix=CHECK10 %s 5 6target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 7target triple = "x86_64-unknown-linux-gnu" 8 9@a = local_unnamed_addr global i32 0, align 4 10@b = local_unnamed_addr global i32 0, align 4 11 12define i32 @main() local_unnamed_addr { 13 14; CHECK1: %mul.1 = mul nsw i32 %mul, %mul 15; CHECK1: --> ((%a.promoted * %a.promoted) * (%a.promoted * %a.promoted)) 16 17; CHECK10: %mul.1 = mul nsw i32 %mul, %mul 18; CHECK10: --> (%a.promoted * %a.promoted * %a.promoted * %a.promoted) 19 20entry: 21 %a.promoted = load i32, i32* @a, align 4 22 %mul = mul nsw i32 %a.promoted, %a.promoted 23 %mul.1 = mul nsw i32 %mul, %mul 24 %mul.2 = mul nsw i32 %mul.1, %mul.1 25 %mul.3 = mul nsw i32 %mul.2, %mul.2 26 %mul.4 = mul nsw i32 %mul.3, %mul.3 27 %mul.5 = mul nsw i32 %mul.4, %mul.4 28 store i32 %mul.5, i32* @a, align 4 29 store i32 31, i32* @b, align 4 30 ret i32 0 31} 32