[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / polly / test / ScopInfo / reduction_multiple_different_operators.ll
blobb77c72a291744d4e89315cdf87ce4ff30c01cea2
1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; Should not be identified as reduction as there are different operations
4 ; involved on sum (multiplication followed by addition)
5 ; CHECK: Reduction Type: NONE
7 ;    void f(int *restrict sum) {
8 ;      for (int i = 0; i < 1024; i++) {
9 ;        *sum = (*sum * 5) + 25;
10 ;      }
11 ;    }
13 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
15 define void @f(i32* noalias %sum) {
16 entry:
17   br label %for.cond
19 for.cond:                                         ; preds = %for.inc, %entry
20   %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
21   %exitcond = icmp ne i32 %i.0, 1024
22   br i1 %exitcond, label %for.body, label %for.end
24 for.body:                                         ; preds = %for.cond
25   %tmp = load i32, i32* %sum, align 4
26   %tmp1 = mul i32 %tmp, 5
27   %mul = add i32 %tmp1, 25
28   store i32 %mul, i32* %sum, align 4
29   br label %for.inc
31 for.inc:                                          ; preds = %for.body
32   %inc = add nsw i32 %i.0, 1
33   br label %for.cond
35 for.end:                                          ; preds = %for.cond
36   ret void