Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
6f34e317
Commit
6f34e317
authored
16 years ago
by
Chris Lattner
Browse files
Options
Downloads
Patches
Plain Diff
Fix PR3353, infinitely jump threading an infinite loop make from switches.
llvm-svn: 62529
parent
740e9870
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
llvm/lib/Transforms/Scalar/JumpThreading.cpp
+5
-0
5 additions, 0 deletions
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/test/Transforms/JumpThreading/2009-01-19-InfSwitchLoop.ll
+21
-0
21 additions, 0 deletions
...test/Transforms/JumpThreading/2009-01-19-InfSwitchLoop.ll
with
26 additions
and
0 deletions
llvm/lib/Transforms/Scalar/JumpThreading.cpp
+
5
−
0
View file @
6f34e317
...
...
@@ -419,6 +419,11 @@ bool JumpThreading::ProcessBranchOnDuplicateCond(BasicBlock *PredBB,
/// switches out of repeated 'if' conditions.
bool
JumpThreading
::
ProcessSwitchOnDuplicateCond
(
BasicBlock
*
PredBB
,
BasicBlock
*
DestBB
)
{
// Can't thread edge to self.
if
(
PredBB
==
DestBB
)
return
false
;
SwitchInst
*
PredSI
=
cast
<
SwitchInst
>
(
PredBB
->
getTerminator
());
SwitchInst
*
DestSI
=
cast
<
SwitchInst
>
(
DestBB
->
getTerminator
());
...
...
This diff is collapsed.
Click to expand it.
llvm/test/Transforms/JumpThreading/2009-01-19-InfSwitchLoop.ll
0 → 100644
+
21
−
0
View file @
6f34e317
; RUN: llvm-as < %s | opt -jump-threading | llvm-dis
; PR3353
define
i32
@test
(
i8
%X
)
{
entry:
%Y
=
add
i8
%X
,
1
%Z
=
add
i8
%Y
,
1
br
label
%bb33.i
bb33.i:
; preds = %bb33.i, %bb32.i
switch
i8
%Y
,
label
%bb32.i
[
i8
39
,
label
%bb35.split.i
i8
13
,
label
%bb33.i
]
bb35.split.i:
ret
i32
5
bb32.i:
ret
i32
1
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment