[llvm] r270722 - Move and add comments to the top for tailcall-string-rvo.ll

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 10:01:11 PDT 2016


Author: timshen
Date: Wed May 25 12:01:09 2016
New Revision: 270722

URL: http://llvm.org/viewvc/llvm-project?rev=270722&view=rev
Log:
Move and add comments to the top for tailcall-string-rvo.ll

Differential Revision: http://reviews.llvm.org/D20311

Modified:
    llvm/trunk/test/CodeGen/PowerPC/tailcall-string-rvo.ll

Modified: llvm/trunk/test/CodeGen/PowerPC/tailcall-string-rvo.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/tailcall-string-rvo.ll?rev=270722&r1=270721&r2=270722&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/tailcall-string-rvo.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/tailcall-string-rvo.ll Wed May 25 12:01:09 2016
@@ -1,5 +1,13 @@
 ; RUN: llc -O2 < %s | FileCheck %s
 
+; The call to function TestBar should be a tail call, when in C++ the string
+; `ret` is RVO returned.
+; string TestFoo() {
+;   string ret = undef;
+;   TestBar(&ret);  // tail call optimized
+;   return ret;
+; }
+
 target triple = "powerpc64le-linux-gnu"
 
 %class.basic_string.11.42.73 = type { %"class.__gnu_cxx::__versa_string.10.41.72" }
@@ -16,11 +24,6 @@ bb:
   ret void
 }
 
-; string TestFoo() {
-;   string ret = undef;
-;   TestBar(&ret);  // tail call optimized
-;   return ret;
-; }
 define void @TestFoo(%class.basic_string.11.42.73* noalias sret %arg) {
 ; CHECK-LABEL: TestFoo:
 ; CHECK: #TC_RETURNd8 TestBar 0




More information about the llvm-commits mailing list