Index: lib/Transforms/Utils/FunctionComparator.cpp =================================================================== --- lib/Transforms/Utils/FunctionComparator.cpp +++ lib/Transforms/Utils/FunctionComparator.cpp @@ -710,7 +710,7 @@ return Res; if (int Res = cmpNumbers(L->getDialect(), R->getDialect())) return Res; - llvm_unreachable("InlineAsm blocks were not uniqued."); + assert(L->getFunctionType() != R->getFunctionType()); return 0; } Index: test/Transforms/MergeFunc/inline-asm.ll =================================================================== --- /dev/null +++ test/Transforms/MergeFunc/inline-asm.ll @@ -0,0 +1,18 @@ +; RUN: opt -mergefunc -S < %s | FileCheck %s +declare void @stuff() + +define void @float_ptr() { + call void asm "nop", "r"(float* null) + call void @stuff() + call void @stuff() + ret void +} + +define void @int_ptr() { +; CHECK-LABEL: @int_ptr +; CHECK-NEXT: tail call void @float_ptr + call void asm "nop", "r"(i32* null) + call void @stuff() + call void @stuff() + ret void +}