aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Bitcode
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-16 01:01:33 +0000
committerDan Gohman <gohman@apple.com>2008-09-16 01:01:33 +0000
commit6fa5bce037481789f129417338cbe38eed1b31b0 (patch)
tree30278a94df97afab20e1f49d4aaa14d93c4127c1 /include/llvm/Bitcode
parent1cddf97fc6a3b1803a3cdcc9fbf0603759e72541 (diff)
downloadexternal_llvm-6fa5bce037481789f129417338cbe38eed1b31b0.zip
external_llvm-6fa5bce037481789f129417338cbe38eed1b31b0.tar.gz
external_llvm-6fa5bce037481789f129417338cbe38eed1b31b0.tar.bz2
Re-enables the new vector select in the bitcode reader, by modifying the
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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode')
-rw-r--r--include/llvm/Bitcode/LLVMBitCodes.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Bitcode/LLVMBitCodes.h b/include/llvm/Bitcode/LLVMBitCodes.h
index d1dcc74..5213828 100644
--- a/include/llvm/Bitcode/LLVMBitCodes.h
+++ b/include/llvm/Bitcode/LLVMBitCodes.h
@@ -206,8 +206,10 @@ namespace bitc {
FUNC_CODE_INST_GETRESULT = 25, // GETRESULT: [ty, opval, n]
FUNC_CODE_INST_EXTRACTVAL = 26, // EXTRACTVAL: [n x operands]
FUNC_CODE_INST_INSERTVAL = 27, // INSERTVAL: [n x operands]
- // fcmp/icmp returning vector of Int1Ty, NOT for vicmp/vfcmp
- FUNC_CODE_INST_VCMP = 28 // VCMP: [opty, opval, opval, pred]
+ // fcmp/icmp returning Int1TY or vector of Int1Ty, NOT for vicmp/vfcmp
+ FUNC_CODE_INST_CMP2 = 28, // VCMP: [opty, opval, opval, pred]
+ // new select on i1 or [N x i1]
+ FUNC_CODE_INST_VSELECT = 29 // VSELECT: [ty,opval,opval,predty,pred]
};
} // End bitc namespace
} // End llvm namespace