mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
54ef20348e
bitcode reader/writer as follows: - add and use new bitcode FUNC_CODE_INST_VSELECT to handle the llvm select opcode using either i1 or [N x i1] as the selector. - retain old BITCODE FUNC_CODE_INST_SELECT in the bitcode reader to handle select on i1 for backwards compatibility with existing bitcode files. - re-enable the vector-select.ll test program. Also, rename the recently added bitcode opcode FUNC_CODE_INST_VCMP to FUNC_CODE_INST_CMP2 and make the bitcode writer use it to handle fcmp/icmp on scalars or vectors. In the bitcode writer, use FUNC_CODE_INST_CMP for vfcmp/vicmp only. In the bitcode reader, have FUNC_CODE_INST_CMP handle icmp/fcmp returning bool, for backwards compatibility with existing bitcode files. Patch by Preston Gurd! llvm-svn: 56233
12 lines
357 B
LLVM
12 lines
357 B
LLVM
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | grep select
|
|
; rudimentary test of select on vectors returning vector of bool
|
|
|
|
define <4 x i32> @foo(<4 x i32> %a, <4 x i32> %b,
|
|
<4 x i1> %cond) nounwind {
|
|
entry:
|
|
%cmp = select <4 x i1> %cond, <4 x i32> %a, <4 x i32> %b
|
|
; <4 x i32> [#uses=1]
|
|
ret <4 x i32> %cmp
|
|
}
|
|
|