brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · acfcf51 Raw
40 lines · plain
1; RUN: opt < %s -O3 -S | FileCheck %s2 3target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"4target triple = "nvptx64-nvidia-cuda"5 6define void @no_vectorization(i32 %n, i32 %a, i32 %b) {7; CHECK-LABEL: no_vectorization(8; CHECK-NOT: <4 x i32>9; CHECK-NOT: <4 x i1>10entry:11  %cmp.5 = icmp sgt i32 %n, 012  br i1 %cmp.5, label %for.body.preheader, label %for.cond.cleanup13 14for.body.preheader:                               ; preds = %entry15  br label %for.body16 17for.cond.cleanup.loopexit:                        ; preds = %for.body18  br label %for.cond.cleanup19 20for.cond.cleanup:                                 ; preds = %for.cond.cleanup.loopexit, %entry21  ret void22 23for.body:                                         ; preds = %for.body.preheader, %for.body24  %i.06 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]25  %add = add nsw i32 %i.06, %a26  %mul = mul nsw i32 %add, %b27  %cmp1 = icmp sgt i32 %mul, -128  tail call void @llvm.assume(i1 %cmp1)29  %inc = add nuw nsw i32 %i.06, 130  %exitcond = icmp eq i32 %inc, %n31  br i1 %exitcond, label %for.cond.cleanup.loopexit, label %for.body32}33 34declare void @llvm.assume(i1) #035 36attributes #0 = { nounwind }37 38!nvvm.annotations = !{!0}39!0 = !{ptr @no_vectorization, !"kernel", i32 1}40