mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c9b0702a89
commit
f6e180324e
@ -0,0 +1,24 @@
|
||||
; Test for a problem afflicting several C++ programs in the testsuite. The
|
||||
; instcombine pass is trying to get rid of the cast in the invoke instruction,
|
||||
; inserting a cast of the return value after the PHI instruction, but which is
|
||||
; used by the PHI instruction. This is bad: because of the semantics of the
|
||||
; invoke instruction, we really cannot perform this transformation at all at
|
||||
; least without splitting the critical edge.
|
||||
;
|
||||
; RUN: llvm-as < %s | opt -instcombine -disable-output
|
||||
|
||||
declare sbyte* %test()
|
||||
|
||||
int %foo() {
|
||||
entry:
|
||||
br bool true, label %cont, label %call
|
||||
call:
|
||||
%P = invoke int*()* cast (sbyte*()* %test to int*()*)()
|
||||
to label %cont except label %N
|
||||
cont:
|
||||
%P2 = phi int* [%P, %call], [null, %entry]
|
||||
%V = load int* %P2
|
||||
ret int %V
|
||||
N:
|
||||
ret int 0
|
||||
}
|
Loading…
Reference in New Issue
Block a user