diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:04:03 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2013-12-22 00:04:03 +0000 |
commit | f8af5cf600354830d4ccf59732403f0f073eccb9 (patch) | |
tree | 2ba0398b4c42ad4f55561327538044fd2c925a8b /test/Transforms/LoopVectorize/if-conv-crash.ll | |
parent | 59d6cff90eecf31cb3dd860c4e786674cfdd42eb (diff) |
Notes
Diffstat (limited to 'test/Transforms/LoopVectorize/if-conv-crash.ll')
-rw-r--r-- | test/Transforms/LoopVectorize/if-conv-crash.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Transforms/LoopVectorize/if-conv-crash.ll b/test/Transforms/LoopVectorize/if-conv-crash.ll index 3283456aa3c3a..f8f2cf1fff4bb 100644 --- a/test/Transforms/LoopVectorize/if-conv-crash.ll +++ b/test/Transforms/LoopVectorize/if-conv-crash.ll @@ -37,3 +37,25 @@ if.end21: ; preds = %lor.lhs.false if.end25: ; preds = %entry ret void } + +; PR15990 +; We can have basic blocks with single entry PHI nodes. +define void @single_entry_phi(i32* %a, i32 *%b) { +entry: + br label %for.cond1.preheader + +for.cond1.preheader: + %inc10 = phi i32 [ 0, %entry ], [ %inc, %for.end ] + br label %for.end + +for.end: + %malicious.phi = phi i32 [ 0, %for.cond1.preheader ] + %inc = add nsw i32 %inc10, 1 + %tobool = icmp eq i32 %inc, 0 + br i1 %tobool, label %for.cond.for.end5, label %for.cond1.preheader + +for.cond.for.end5: + %and.lcssa = phi i32 [ %malicious.phi, %for.end ] + store i32 %and.lcssa, i32* %a, align 4 + ret void +} |