• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s  -loop-vectorize -instcombine -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7 -S | FileCheck %s
2target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3target triple = "x86_64-unknown-linux-gnu"
4
5define void @test1() {
6entry:
7  %alloca = alloca float, align 4
8  br label %loop_exit.dim.11.critedge
9
10loop_exit.dim.11.critedge:                        ; preds = %loop_body.dim.0
11  %ptrint = ptrtoint float* %alloca to i64
12  %maskedptr = and i64 %ptrint, 4
13  %maskcond = icmp eq i64 %maskedptr, 0
14  br label %loop_header.dim.017.preheader
15
16loop_header.dim.017.preheader:                    ; preds = %loop_exit.dim.016, %loop_exit.dim.11.critedge
17  br label %loop_body.dim.018
18
19loop_body.dim.018:                                ; preds = %loop_body.dim.018, %loop_header.dim.017.preheader
20  %invar_address.dim.019.0135 = phi i64 [ 0, %loop_header.dim.017.preheader ], [ %0, %loop_body.dim.018 ]
21  call void @llvm.assume(i1 %maskcond)
22; CHECK:     call void @llvm.assume(
23; CHECK-NOT: call void @llvm.assume(
24  %0 = add nuw nsw i64 %invar_address.dim.019.0135, 1
25  %1 = icmp eq i64 %0, 256
26  br i1 %1, label %loop_header.dim.017.preheader, label %loop_body.dim.018
27}
28
29; Function Attrs: nounwind
30declare void @llvm.assume(i1) #0
31
32attributes #0 = { nounwind }
33