summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Analysis
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2019-07-12 01:42:03 +0000
committerVitaly Buka <vitalybuka@google.com>2019-07-12 01:42:03 +0000
commitc559e63798e69be1d7c66847b662b53ba88f0f9c (patch)
tree3106fe7e5e1551c8f253b0f84f26a2dd56a8285e /llvm/unittests/Analysis
parent669ad5ff1502fa81fd76d6e745781df60f713756 (diff)
downloadbcm5719-llvm-c559e63798e69be1d7c66847b662b53ba88f0f9c.tar.gz
bcm5719-llvm-c559e63798e69be1d7c66847b662b53ba88f0f9c.zip
Handle IntToPtr in isBytewiseValue
Summary: This helps with more efficient use of memset for pattern initialization From @pcc prototype for -ftrivial-auto-var-init=pattern optimizations Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options) ``` master patch diff Os 8.238864e+05 8.238864e+05 0.0 O3 1.054797e+06 1.054797e+06 0.0 Os zero 8.292384e+05 8.292384e+05 0.0 O3 zero 1.062626e+06 1.062626e+06 0.0 Os pattern 8.579712e+05 8.338048e+05 -0.030299 O3 pattern 1.090502e+06 1.067574e+06 -0.020481 ``` Zero vs Pattern on master ``` zero pattern diff Os 8.292384e+05 8.579712e+05 0.036578 O3 1.062626e+06 1.090502e+06 0.025124 ``` Zero vs Pattern with the patch ``` zero pattern diff Os 8.292384e+05 8.338048e+05 0.003333 O3 1.062626e+06 1.067574e+06 0.003193 ``` Reviewers: pcc, eugenis Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63967 llvm-svn: 365858
Diffstat (limited to 'llvm/unittests/Analysis')
-rw-r--r--llvm/unittests/Analysis/ValueTrackingTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/Analysis/ValueTrackingTest.cpp b/llvm/unittests/Analysis/ValueTrackingTest.cpp
index 90c879d2812..9f486e85759 100644
--- a/llvm/unittests/Analysis/ValueTrackingTest.cpp
+++ b/llvm/unittests/Analysis/ValueTrackingTest.cpp
@@ -794,11 +794,11 @@ const std::pair<const char *, const char *> IsBytewiseValueTests[] = {
"i16* inttoptr (i64 0 to i16*)",
},
{
- "",
+ "i8 -1",
"i16* inttoptr (i64 -1 to i16*)",
},
{
- "",
+ "i8 -86",
"i16* inttoptr (i64 -6148914691236517206 to i16*)",
},
{
@@ -806,7 +806,7 @@ const std::pair<const char *, const char *> IsBytewiseValueTests[] = {
"i16* inttoptr (i48 -1 to i16*)",
},
{
- "",
+ "i8 -1",
"i16* inttoptr (i96 -1 to i16*)",
},
{
OpenPOWER on IntegriCloud