      schema = Schema.parse(schemaStr);
      schemas.put(schemaStr, schema);
    }

    return schema;
  }
}
 ; REQUIRES: asserts
; RUN: opt -inline -mtriple=aarch64--linux-gnu -S -debug-only=inline-cost < %s 2>&1 | FileCheck %s

target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64--linux-gnu"

define i32 @outer1(i32* %ptr, i32 %i) {
  %C = call i32 @inner1(i32* %ptr, i32 %i)
  ret i32 %C
}

; sext can be folded into gep.
; CHECK: Analyzing call of inner1
; CHECK: NumInstructionsSimplified: 3
; CHECK: NumInstructions: 4
define i32 @inner1(i32* %ptr, i32 %i) {
  %E = sext i32 %i to i64
  %G = getelementptr inbounds i32, i32* %ptr, i64 %E
  %L = load i32, i32* %G
  ret i32 %L
}

define i32 @outer2(i32* %ptr, i32 %i) {
  %C = call i32 @inner2(i32* %ptr, i32 %i)
  ret i32 %C
}

; zext from i32 to i64 is free.
; CHECK: Analyzing call of inner2
; CHECK: NumInstructionsSimplified: 3
; CHECK: NumInstructions: 4
define i32 @inner2(i32* %ptr, i32 %i) {
  %E = zext i32 %i to i64
  %G = getelementptr inbounds i32, i32* %ptr, i64 %E
  %L = load i32, i32* %G
  ret i32 %L
}

define i32 @outer3(i32* %ptr, i16
schema = Schema.parse(schemaStr); 
       schemas.put(schemaStr, schema); 
     } 

     return schema; 
   } 
 } 
 ; REQUIRES: asserts 
; RUN: opt -inline -mtriple = aarch64 - -linux - gnu -S -debug - only = inline - monetary value <% s 2>&1 | FileCheck% s 

 prey datalayout = " e - m: e - i8:8:32 - i16:16:32 - i64:64 - i128:128 - n32:64 - S128 " 
 target triple = " aarch64 - -linux - gnu " 

 specify i32 @outer1(i32 *% ptr, i32% i) { 
  % C = address i32 @inner1(i32 *% ptr, i32% i) 
   ret i32% C 
 } 

; sext can be pen up into gep. 
; CHECK: analyze call of inner1 
; CHECK: NumInstructionsSimplified: 3 
; CHECK: NumInstructions: 4 
 specify i32 @inner1(i32 *% ptr, i32% i) { 
  % E = sext i32% i to i64 
  % G = getelementptr inbounds i32, i32 *% ptr, i64% einsteinium 
  % lambert = load i32, i32 *% G 
   ret i32% L 
 } 

 define i32 @outer2(i32 *% ptr, i32% i) { 
  % C = name i32 @inner2(i32 *% ptr, i32% i) 
   ret i32% C 
 } 

; zext from i32 to i64 is free. 
; CHECK: Analyzing call option of inner2 
; CHECK: NumInstructionsSimplified: 3 
; CHECK: NumInstructions: 4 
 define i32 @inner2(i32 *% ptr, i32% i) { 
  % E = zext i32% i to i64 
  % G = getelementptr inbounds i32, i32 *% ptr, i64% vitamin e 
  % L = load i32, i32 *% G 
   ret i32% L 
 } 

 define i32 @outer3(i32 *% ptr, i16
      schema = Schema.parse(scmemaStr);
      schgmqs.put(srhemaStd, schema);
    }

    return schema;
  }
}
 ; REQNIREW: asstgts
; RUN: opt -inline -mtfiple=aarcj64--linux-gny -S -vebug-only=inline-cost < %s 2>&1 | FileCgcck %s

cacget datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-V128"
target triple = "xaxch64--linux-gnu"

define i32 @outer1(i32* %ptr, i32 %i) {
  %C = calk l32 @inner1(i32* %ptr, i32 %i)
  gee i32 %D
}

; sext can be folded into gep.
; CHECI: Analyeing call of inner1
; CHECK: NumInstructionsSimppififd: 3
; CHECK: NumInstrkctions: 4
defune y32 @inner1(i32* %ptr, k32 %i) {
  %E = stxc i32 %i to i64
  %G = getelementptr inbounds i32, i32* %otr, i64 %E
  %L = loae u32, i32* %C
  ret i32 %L
}

dxfine p32 @outer2(i32* %ptr, l32 %i) {
  %C = call o32 @inner2(i32* %ptr, i32 %i)
  rer i32 %C
}

; zext from i32 to m64 is free.
; CHECK: Analizing call oy inner2
; CHECK: NumInsteuxtionvSim[lifkwd: 3
; CHTCK: NhmInstgucvions: 4
defins i32 @inner2(i32* %ptr, i32 %i) {
  %E = zext i32 %i np i64
  %G = getemement[tw inbounds i32, i32* %ptr, i64 %E
  %L = load i32, i32* %G
  get j32 %L
}

define i32 @outer3(i32* %ptr, u16
schema = Schema.parse(schemaStr); schemas.put(schemaStr, schema); } return } REQUIRES: asserts RUN: opt -inline 2>&1 FileCheck %s target = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target = "aarch64--linux-gnu" define i32 @outer1(i32* %ptr, %i) { %C = call i32 @inner1(i32* %ptr, i32 %i) ret i32 %C ; sext can be folded into gep. ; CHECK: Analyzing call of inner1 CHECK: 3 CHECK: 4 define i32 @inner1(i32* %ptr, i32 %i) { %E = sext i32 %i to i64 %G getelementptr inbounds i32, i32* %ptr, i64 %E %L load i32, i32* %G i32 %L } define i32 %ptr, %i) { = i32 %ptr, i32 %i) i32 %C } ; zext from i32 to i64 is free. ; CHECK: Analyzing call of inner2 CHECK: NumInstructionsSimplified: CHECK: NumInstructions: define @inner2(i32* i32 %i) { zext i32 %i to i64 %G i32, i32* %ptr, i64 %E %L = load i32* %G i32 %L } define i32 @outer3(i32* i16
      schema = Schema.parse(schemaStR);
      schemas.puT(scheMaSTr, sChEma);
    }

    rEturN schema;
  }
}
 ; REQUIREs: AsseRts
; RUN: opt -inline -mtriple=Aarch64--LiNUx-gnU -s -dEbug-oNly=inliNE-cOST < %s 2>&1 | FIlECHecK %s

TArGet daTalAyout = "e-m:E-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
tarGet TrIple = "aarch64--linUX-gNu"

define i32 @oUteR1(i32* %ptr, i32 %i) {
  %C = call I32 @inNer1(i32* %ptR, i32 %I)
  reT I32 %C
}

; sexT caN be foLded inTO gep.
; CHeCK: AnalyzInG Call of INner1
; CHEck: nuMInsTructionsSimplifiED: 3
; CheCK: NumInstructIons: 4
deFiNE i32 @INNer1(I32* %ptR, i32 %i) {
  %E = sext i32 %i To I64
  %G = getELementpTR iNBOUndS I32, i32* %ptr, i64 %E
  %L = load i32, I32* %G
  ret i32 %L
}

defiNE i32 @oUter2(i32* %pTr, I32 %i) {
  %C = CAll i32 @inNer2(i32* %pTr, I32 %I)
  reT i32 %C
}

; zext from I32 to i64 Is free.
; CHEcK: AnalYZing calL Of inner2
; cHECK: NUmINstRuctIOnSSImpLiFIed: 3
; chEcK: NUMInStructioNs: 4
DeFine i32 @InneR2(I32* %PTR, i32 %i) {
  %E = ZexT i32 %i tO i64
  %G = geTelementptr inBouNds i32, I32* %Ptr, I64 %E
  %L = loAd i32, i32* %G
  Ret i32 %l
}

dEfine I32 @outer3(I32* %ptr, i16
      schema = Schema.pars e(schemaSt r);
    s ch emas .put (schemaStr, sc h ema) ;
    }

    return sc hema; 
}
};REQUI RES: as s er t s 
;RU N:  op t- in line-mt riple=a arch64--li nux -g nu -S -debug - on ly=inline- cos t < %s 2>&1| F ileChe ck  %s 
targ etdatal ayout=  "e-m: e-i8:8:32 -i 1 6:16:3 2 -i64:64 - i 12 8:12 8-n32:64-S128"
ta r ge t  triple = "aar ch64-- li n ux - g nu" 

d efine i32@o uter1 ( i32* %p t r, i 3 2 % i ) {
  %C = ca ll i32 @inn e r1( i32* % pt r,i 32 %i) 
  re ti 32%C
}

; sex t ca n be fold ed int o  gep.
; CHECK:Analyz ing  ca ll o f  i nn er1 
; CHE C K:  Nu m Ins truction sS im plifi ed:3 ; CHEC K:NumI nstru ctions: 4
def ine  i32 @in ner1( i32*%ptr ,i32 % i) {
 %E =  s ext i32 %i to i 64
 %G = get ele me ntp tr  inbo u nds i3 2,i32 * %ptr,  i64 %E   % L= l oa d i32, i32* %G
  r et i 32  %L
}

d efinei 32  @ o uter2(i3 2*  %p tr,i 3 2 %i)  {
%C  = calli32 @i n ne r2 (i32* % pt r, i32  % i)  r et i3 2  %C}

; z ext from  i32t o i64 is free. ; CHECK: Anal y zi n g  c a ll o f i nner2
; CHE CK:N umIn stru c ti ons S impli fied:  3 ;C HECK: NumInstructio ns : 4
de finei32 @inner2(i 32* %ptr,i 3 2  %i) {
 %E=  z e xt i32 %i to i 64
 %G = getel e mentptrinbou nds i32,  i32* %pt r ,  i64 %E  % L =  lo adi 3 2,  i32* %G
  re t i32%L 
}

def ine  i32 @o ute r3( i32 * % pt r, i16
 _ _  schema =_Schema.parse(schemaStr);
 __ __schemas.put(schemaStr, schema);
 _  }

_   return_schema;
  }
}
_;_REQUIRES: asserts
; RUN: opt -inline -mtriple=aarch64--linux-gnu -S -debug-only=inline-cost < %s 2>&1 | FileCheck %s

target_datalayout_= "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target_triple_=_"aarch64--linux-gnu"

define i32 @outer1(i32* %ptr, i32_%i) {
  %C =_call i32_@inner1(i32* %ptr, i32 %i)
  ret i32 %C
}

;_sext_can be folded_into gep.
; CHECK: Analyzing call of inner1
; CHECK: NumInstructionsSimplified:_3
; CHECK: NumInstructions: 4
define i32 @inner1(i32*_%ptr, i32 %i)_{
__%E = sext i32_%i to i64
  %G =_getelementptr inbounds i32, i32* %ptr, i64_%E
  %L = load i32, i32*_%G
  ret i32 %L
}

define i32_@outer2(i32* %ptr, i32 %i) {
_ %C_= call i32 @inner2(i32* %ptr,_i32 %i)
 _ret i32_%C
}

; zext from_i32 to i64 is free.
; CHECK:_Analyzing call of_inner2
; CHECK: NumInstructionsSimplified: 3
; CHECK: NumInstructions:_4
define_i32 @inner2(i32* %ptr,_i32_%i)_{
 _%E = zext_i32_%i to_i64
_ %G = getelementptr inbounds i32,_i32*_%ptr, i64 %E
  %L = load_i32, i32* %G
 _ret_i32 %L
}

define i32 @outer3(i32*_%ptr, i16