Index: test/GPGPU/test.ll =================================================================== --- /dev/null +++ test/GPGPU/test.ll @@ -0,0 +1,55 @@ +; RUN: opt %loadPolly -polly-codegen-ppcg -polly-invariant-load-hoisting -polly-acc-fail-on-verify-module-failure \ +; RUN: -disable-output < %s + +; ModuleID = 'reduced.ll' +source_filename = "bugpoint-output-cb5513b.bc" +target datalayout = "e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" +target triple = "x86_64-unknown-linux-gnu" + +declare void @fn_to_fence(i8 *%val) + +; Function Attrs: nounwind uwtable +define void @f(i32* noalias %nprocx, i32* noalias %igroup_cart) #1 { +entry: + br label %entry.split + +entry.split: ; preds = %entry + %tmp = tail call noalias i8* @malloc(i64 undef) #2 + br label %"64" + +"64": ; preds = %"72", %entry.split + %tmp1 = phi i32 [ %tmp13, %"72" ], [ 0, %entry.split ] + %tmp2 = load i32, i32* %nprocx, align 4 + br label %"65" + +"65": ; preds = %"65", %"64" + %tmp4 = phi i32 [ %tmp11, %"65" ], [ 0, %"64" ] + %tmp5 = sext i32 %tmp4 to i64 + %tmp8 = bitcast i8* %tmp to i32* + %tmp9 = getelementptr i32, i32* %tmp8, i64 %tmp5 + store i32 %tmp1, i32* %tmp9, align 4 + %tmp10 = icmp eq i32 %tmp4, %tmp2 + %tmp11 = add i32 %tmp4, 1 + br i1 %tmp10, label %"67", label %"65" + +"67": ; preds = %"65" + call void @fn_to_fence(i8* %tmp) #2 + br i1 undef, label %"72", label %"70" + +"70": ; preds = %"69" + ret void + +"72": ; preds = %"69" + %tmp13 = add i32 %tmp1, 1 + br label %"64" +} + +; Function Attrs: nounwind +declare noalias i8* @malloc(i64) #2 + +declare void @used_fn(...) + + +attributes #0 = { argmemonly nounwind } +attributes #1 = { nounwind uwtable } +attributes #2 = { nounwind }