1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as < %s > %t1 2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as < %p/Inputs/remangle_intrinsics.ll > %t2 3*9880d681SAndroid Build Coastguard Worker; RUN: llvm-lto %t1 %t2 | FileCheck %s 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker; We have "struct.rtx_def" type in both modules being LTOed. Both modules use 6*9880d681SAndroid Build Coastguard Worker; an overloaded intrinsic which has this type in its signature/name. When 7*9880d681SAndroid Build Coastguard Worker; modules are loaded one of the types is renamed to "struct.rtx_def.0". 8*9880d681SAndroid Build Coastguard Worker; The intrinsic which uses this type should be remangled/renamed as well. 9*9880d681SAndroid Build Coastguard Worker; If we didn't do that verifier would complain. 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Worker; CHECK: Wrote native object file 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker%struct.rtx_def = type { i16 } 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Workerdefine void @foo(%struct.rtx_def* %a, i8 %b, i32 %c) { 16*9880d681SAndroid Build Coastguard Worker call void @llvm.memset.p0struct.rtx_def.i32(%struct.rtx_def* %a, i8 %b, i32 %c, i32 4, i1 true) 17*9880d681SAndroid Build Coastguard Worker ret void 18*9880d681SAndroid Build Coastguard Worker} 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.memset.p0struct.rtx_def.i32(%struct.rtx_def*, i8, i32, i32, i1) 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Worker; Check that remangling code doesn't fail on an intrinsic with wrong signature 23*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.memset.i64(i8* nocapture, i8, i64, i32) nounwind