brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 432c155 Raw
57 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly<no-default-opts>' -polly-print-detect -polly-invariant-load-hoisting=true -disable-output < %s 2>&1 | FileCheck %s2;3; This crashed at some point as the pointer returned by the call4; to @__errno_location is invariant and defined in the SCoP but not5; loaded. Therefore it is not hoisted and consequently not available6; at the beginning of the SCoP where we would need it if we would try7; to hoist %tmp. We don't try to hoist %tmp anymore but this test still8; checks that this passes to code generation and produces valid code.9;10; This SCoP is currently rejected because %call9 is not considered a valid11; base pointer.12;13; CHECK-NOT: Valid Region for Scop14;15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"16 17; Function Attrs: nounwind uwtable18define void @fileblobSetFilename() {19entry:20  br i1 undef, label %if.end, label %cleanup21 22if.end:                                           ; preds = %entry23  br i1 undef, label %land.lhs.true, label %if.end.1824 25land.lhs.true:                                    ; preds = %if.end26  %call9 = tail call ptr @__errno_location()27  %tmp = load i32, ptr %call9, align 4, !tbaa !128  br i1 false, label %if.then.12, label %if.end.1829 30if.then.12:                                       ; preds = %land.lhs.true31  br label %if.end.1832 33if.end.18:                                        ; preds = %if.then.12, %land.lhs.true, %if.end34  %fd.0 = phi i32 [ undef, %if.then.12 ], [ undef, %land.lhs.true ], [ undef, %if.end ]35  br i1 undef, label %if.then.21, label %if.end.2736 37if.then.21:                                       ; preds = %if.end.1838  unreachable39 40if.end.27:                                        ; preds = %if.end.1841  br label %cleanup42 43cleanup:                                          ; preds = %if.end.27, %entry44  ret void45}46 47; Function Attrs: nounwind readnone48declare ptr @__errno_location()49 50!llvm.ident = !{!0}51 52!0 = !{!"clang version 3.8.0 (trunk 250010) (llvm/trunk 250018)"}53!1 = !{!2, !2, i64 0}54!2 = !{!"int", !3, i64 0}55!3 = !{!"omnipotent char", !4, i64 0}56!4 = !{!"Simple C/C++ TBAA"}57