mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-30 07:22:55 +01:00
992d9788b3
The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
20 lines
684 B
LLVM
20 lines
684 B
LLVM
; XFAIL: *
|
|
; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep bitcast
|
|
|
|
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
|
|
%HashEntry = type { uint, sbyte *, \2 } *
|
|
%hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int }
|
|
%hash_entry = type { uint, sbyte *, \2 * }
|
|
implementation
|
|
|
|
%Hash "MakeHash"(int %size, int (uint) * %map) {
|
|
%reg112 = malloc sbyte * *, uint 3 ; <sbyte * * *> [#uses=5]
|
|
%reg107-uint = cast int %size to uint ; <uint> [#uses=1]
|
|
%reg115 = malloc sbyte *, uint %reg107-uint ; <sbyte * *> [#uses=1]
|
|
store sbyte * * %reg115, sbyte * * * %reg112
|
|
|
|
%cast246 = cast sbyte * * * %reg112 to %Hash ; <%Hash> [#uses=1]
|
|
ret %Hash %cast246
|
|
}
|
|
|