Add compile command to each testcase
[gcc-vect-testsuite.git] / pr33846.ll
blob9256cc0376b4af2ca3d02dcc0bfad77406f25066
1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; Obtained from C source as:
3 ; clang -S -emit-llvm -O0 pr33846.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr33846.s > pr33846.ll
6 ; ModuleID = 'pr33846.s'
7 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
8 target triple = "x86_64-unknown-linux-gnu"
10 define i32 @clamp_val(i32 %i) nounwind uwtable {
11 entry:
12   %neg = xor i32 %i, -2147483648
13   %shr = ashr i32 %neg, 31
14   ret i32 %shr
17 define void @_mix_some_samples(i64 %buf, i32* %mix_buffer, i32 %mix_size) nounwind uwtable {
18 entry:
19   %tmp = sub i32 -1, %mix_size
20   %tmp1 = icmp sgt i32 %tmp, -1
21   %smax = select i1 %tmp1, i32 %tmp, i32 -1
22   %tmp2 = add i32 %mix_size, %smax
23   %tmp3 = add i32 %tmp2, 1
24   %tmp5 = zext i32 %tmp3 to i64
25   br label %for.cond
27 for.cond:                                         ; preds = %for.inc, %entry
28   %indvar = phi i64 [ %indvar.next, %for.inc ], [ 0, %entry ]
29   %p.0 = getelementptr i32* %mix_buffer, i64 %indvar
30   %tmp10 = mul i64 %indvar, 2
31   %buf.addr.0 = add i64 %buf, %tmp10
32   %exitcond = icmp ne i64 %indvar, %tmp5
33   br i1 %exitcond, label %for.body, label %for.end
35 for.body:                                         ; preds = %for.cond
36   %tmp4 = load i32* %p.0, align 4
37   %add = add nsw i32 %tmp4, 8388608
38   %call = call i32 @clamp_val(i32 %add)
39   %conv = trunc i32 %call to i16
40   %tmp12 = inttoptr i64 %buf.addr.0 to i16*
41   store i16 %conv, i16* %tmp12, align 2
42   br label %for.inc
44 for.inc:                                          ; preds = %for.body
45   %indvar.next = add i64 %indvar, 1
46   br label %for.cond
48 for.end:                                          ; preds = %for.cond
49   ret void
51 ; CHECK: define