view test/CodeGen/Mips/long-call-mcount.ll @ 146:3fc4d5c3e21e

set tail call flag for code segment in CGCAll
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 19:23:36 +0900
parents 3a76565eade5
children c2174574ed3a
line wrap: on
line source

; Check call to mcount in case of long/short call options.
; RUN: llc -march=mips -target-abi o32 --mattr=+long-calls,+noabicalls < %s \
; RUN:   | FileCheck -check-prefixes=CHECK,LONG %s
; RUN: llc -march=mips -target-abi o32 --mattr=-long-calls,+noabicalls < %s \
; RUN:   | FileCheck -check-prefixes=CHECK,SHORT %s

; Function Attrs: noinline nounwind optnone
define void @foo() #0 {
entry:
  ret void

; CHECK-LABEL: foo
; LONG:          lui     $1, %hi(_mcount)
; LONG-NEXT:     addiu   $25, $1, %lo(_mcount)
; LONG-NEXT:     jalr    $25
; SHORT:         jal     _mcount
}

attributes #0 = { "instrument-function-entry-inlined"="_mcount" }