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