[llvm] r321357 - [mips] Add test case to check that calls to mcount follow long calls / short calls options. NFC

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 22 05:45:46 PST 2017


Author: atanasyan
Date: Fri Dec 22 05:45:46 2017
New Revision: 321357

URL: http://llvm.org/viewvc/llvm-project?rev=321357&view=rev
Log:
[mips] Add test case to check that calls to mcount follow long calls / short calls options. NFC

Added:
    llvm/trunk/test/CodeGen/Mips/long-call-mcount.ll

Added: llvm/trunk/test/CodeGen/Mips/long-call-mcount.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/long-call-mcount.ll?rev=321357&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/Mips/long-call-mcount.ll (added)
+++ llvm/trunk/test/CodeGen/Mips/long-call-mcount.ll Fri Dec 22 05:45:46 2017
@@ -0,0 +1,19 @@
+; 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" }




More information about the llvm-commits mailing list