From 06c03e57054537bc2576d25ec53a8f3e29058703 Mon Sep 17 00:00:00 2001 From: Tim Shen Date: Wed, 25 May 2016 17:01:09 +0000 Subject: [PATCH] Move and add comments to the top for tailcall-string-rvo.ll Differential Revision: http://reviews.llvm.org/D20311 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270722 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/PowerPC/tailcall-string-rvo.ll | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/CodeGen/PowerPC/tailcall-string-rvo.ll b/test/CodeGen/PowerPC/tailcall-string-rvo.ll index b6b5fb9dbf7..3f850e6e94b 100644 --- a/test/CodeGen/PowerPC/tailcall-string-rvo.ll +++ b/test/CodeGen/PowerPC/tailcall-string-rvo.ll @@ -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 -- 2.11.0