forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CastInst::castIsValid should return true if the dest type is the same as
Value's current type. The casting is trivial even for aggregate type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172143 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Evan Cheng
committed
Jan 10, 2013
1 parent
0e4776c
commit 582e4f2
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
; RUN: opt -mergefunc -disable-output < %s | ||
; This used to trigger a ConstantExpr::getBitCast assertion. | ||
|
||
define void @t1() unnamed_addr uwtable ssp align 2 { | ||
entry: | ||
switch i32 undef, label %sw.bb12 [ | ||
i32 127, label %sw.bb | ||
i32 126, label %sw.bb4 | ||
] | ||
|
||
sw.bb: ; preds = %entry | ||
unreachable | ||
|
||
sw.bb4: ; preds = %entry | ||
unreachable | ||
|
||
sw.bb12: ; preds = %entry | ||
ret void | ||
} | ||
|
||
define void @t2() unnamed_addr uwtable ssp align 2 { | ||
entry: | ||
switch i32 undef, label %sw.bb8 [ | ||
i32 4, label %sw.bb | ||
i32 3, label %sw.bb4 | ||
] | ||
|
||
sw.bb: ; preds = %entry | ||
unreachable | ||
|
||
sw.bb4: ; preds = %entry | ||
ret void | ||
|
||
sw.bb8: ; preds = %entry | ||
unreachable | ||
} |