diff --git a/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp b/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp --- a/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp @@ -135,6 +135,7 @@ STRINGIFY_CODE(MODULE_CODE, FUNCTION) STRINGIFY_CODE(MODULE_CODE, ALIAS) STRINGIFY_CODE(MODULE_CODE, GCNAME) + STRINGIFY_CODE(MODULE_CODE, COMDAT) STRINGIFY_CODE(MODULE_CODE, VSTOFFSET) STRINGIFY_CODE(MODULE_CODE, METADATA_VALUES_UNUSED) STRINGIFY_CODE(MODULE_CODE, SOURCE_FILENAME) @@ -176,16 +177,20 @@ STRINGIFY_CODE(TYPE_CODE, OPAQUE) STRINGIFY_CODE(TYPE_CODE, INTEGER) STRINGIFY_CODE(TYPE_CODE, POINTER) + STRINGIFY_CODE(TYPE_CODE, HALF) STRINGIFY_CODE(TYPE_CODE, ARRAY) STRINGIFY_CODE(TYPE_CODE, VECTOR) STRINGIFY_CODE(TYPE_CODE, X86_FP80) STRINGIFY_CODE(TYPE_CODE, FP128) STRINGIFY_CODE(TYPE_CODE, PPC_FP128) STRINGIFY_CODE(TYPE_CODE, METADATA) + STRINGIFY_CODE(TYPE_CODE, X86_MMX) STRINGIFY_CODE(TYPE_CODE, STRUCT_ANON) STRINGIFY_CODE(TYPE_CODE, STRUCT_NAME) STRINGIFY_CODE(TYPE_CODE, STRUCT_NAMED) STRINGIFY_CODE(TYPE_CODE, FUNCTION) + STRINGIFY_CODE(TYPE_CODE, TOKEN) + STRINGIFY_CODE(TYPE_CODE, BFLOAT) } case bitc::CONSTANTS_BLOCK_ID: diff --git a/llvm/test/Bitcode/bcanalyzer-comdat.ll b/llvm/test/Bitcode/bcanalyzer-comdat.ll new file mode 100644 --- /dev/null +++ b/llvm/test/Bitcode/bcanalyzer-comdat.ll @@ -0,0 +1,5 @@ +; RUN: llvm-as < %s | llvm-bcanalyzer -dump | FileCheck %s + +; CHECK: %x) { + %a = bitcast <2 x i32> %x to x86_mmx + ret x86_mmx %a +} + +define bfloat @test_bfloat(i16 %x) { + %a = bitcast i16 %x to bfloat + ret bfloat %a +} + +declare void @llvm.token(token)