[PATCH] D51410: [SLC] Add an alignment to printf->puts global string
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 6 01:45:21 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL341527: [SLC] Add an alignment to CreateGlobalString (authored by dmgreen, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D51410?vs=163669&id=164167#toc
Repository:
rL LLVM
https://reviews.llvm.org/D51410
Files:
llvm/trunk/lib/IR/IRBuilder.cpp
llvm/trunk/test/Transforms/InstCombine/printf-1.ll
Index: llvm/trunk/test/Transforms/InstCombine/printf-1.ll
===================================================================
--- llvm/trunk/test/Transforms/InstCombine/printf-1.ll
+++ llvm/trunk/test/Transforms/InstCombine/printf-1.ll
@@ -14,7 +14,7 @@
@percent_f = constant [3 x i8] c"%f\00"
@percent_s = constant [4 x i8] c"%s\0A\00"
@empty = constant [1 x i8] c"\00"
-; CHECK: [[$STR:@[a-z0-9]+]] = private unnamed_addr constant [12 x i8] c"hello world\00"
+; CHECK: [[$STR:@[a-z0-9]+]] = private unnamed_addr constant [12 x i8] c"hello world\00", align 1
declare i32 @printf(i8*, ...)
Index: llvm/trunk/lib/IR/IRBuilder.cpp
===================================================================
--- llvm/trunk/lib/IR/IRBuilder.cpp
+++ llvm/trunk/lib/IR/IRBuilder.cpp
@@ -50,6 +50,7 @@
nullptr, GlobalVariable::NotThreadLocal,
AddressSpace);
GV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
+ GV->setAlignment(1);
return GV;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51410.164167.patch
Type: text/x-patch
Size: 1017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180906/3976e3f3/attachment.bin>
More information about the llvm-commits
mailing list