[llvm] r231041 - LoopIdiom: Give globals for memset_pattern16 private linkage.
Rafael EspĂndola
rafael.espindola at gmail.com
Tue Mar 3 11:30:42 PST 2015
Actually, our CodeGen had bugs: http://llvm.org/bugs/show_bug.cgi?id=18743
Thanks for fixing this!
On 2 March 2015 at 16:17, Benjamin Kramer <benny.kra at googlemail.com> wrote:
> Author: d0k
> Date: Mon Mar 2 18:17:09 2015
> New Revision: 231041
>
> URL: http://llvm.org/viewvc/llvm-project?rev=231041&view=rev
> Log:
> LoopIdiom: Give globals for memset_pattern16 private linkage.
>
> There's really no reason to have them have entries in the symbol table
> anymore. Old versions of ld64 had some bugs in this area but those have
> been fixed long ago.
>
> Modified:
> llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
> llvm/trunk/test/Transforms/LoopIdiom/basic.ll
>
> Modified: llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp?rev=231041&r1=231040&r2=231041&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp Mon Mar 2 18:17:09 2015
> @@ -1005,7 +1005,7 @@ processLoopStridedStore(Value *DestPtr,
> // Otherwise we should form a memset_pattern16. PatternValue is known to be
> // an constant array of 16-bytes. Plop the value into a mergable global.
> GlobalVariable *GV = new GlobalVariable(*M, PatternValue->getType(), true,
> - GlobalValue::InternalLinkage,
> + GlobalValue::PrivateLinkage,
> PatternValue, ".memset_pattern");
> GV->setUnnamedAddr(true); // Ok to merge these.
> GV->setAlignment(16);
>
> Modified: llvm/trunk/test/Transforms/LoopIdiom/basic.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopIdiom/basic.ll?rev=231041&r1=231040&r2=231041&view=diff
> ==============================================================================
> --- llvm/trunk/test/Transforms/LoopIdiom/basic.ll (original)
> +++ llvm/trunk/test/Transforms/LoopIdiom/basic.ll Mon Mar 2 18:17:09 2015
> @@ -1,5 +1,12 @@
> ; RUN: opt -basicaa -loop-idiom < %s -S | FileCheck %s
> target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
> +
> +; For @test11_pattern
> +; CHECK: @.memset_pattern = private unnamed_addr constant [4 x i32] [i32 1, i32 1, i32 1, i32 1]
> +
> +; For @test13_pattern
> +; CHECK: @.memset_pattern1 = private unnamed_addr constant [2 x i32*] [i32* @G, i32* @G]
> +
> target triple = "x86_64-apple-darwin10.0.0"
>
> define void @test1(i8* %Base, i64 %Size) nounwind ssp {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list