mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
New testcase
llvm-svn: 19946
This commit is contained in:
parent
648e85bb8a
commit
b7b94f8e9b
22
test/Regression/Transforms/InstCombine/cast-load-gep.ll
Normal file
22
test/Regression/Transforms/InstCombine/cast-load-gep.ll
Normal file
@ -0,0 +1,22 @@
|
||||
; RUN: llvm-as < %s | opt -instcombine -globaldce | llvm-dis | not grep Array
|
||||
|
||||
; Pulling the cast out of the load allows us to eliminate the load, and then
|
||||
; the whole array.
|
||||
|
||||
%unop = type {int }
|
||||
%op = type {float}
|
||||
|
||||
%Array = internal constant [1 x %op* (%op*)*] [ %op* (%op*)* %foo ]
|
||||
|
||||
implementation
|
||||
|
||||
%op* %foo(%op* %X) {
|
||||
ret %op* %X
|
||||
}
|
||||
|
||||
%unop* %caller(%op* %O) {
|
||||
%tmp = load %unop* (%op*)** cast ([1 x %op* (%op*)*]* %Array to %unop* (%op*)**)
|
||||
%tmp.2 = call %unop* (%op*)* %tmp(%op* %O)
|
||||
ret %unop* %tmp.2
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user