[PATCH] D35933: Eliminate TargetTransformInfo::isFoldableMemAccess()
Jonas Paulsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 04:11:38 PDT 2017
jonpa updated this revision to Diff 110349.
jonpa added a comment.
The Hexagon test passes by just updating the label like #998->#999. It seems that the loop is now one instruction smaller also, so I am assuming everyone is happy with this.
Diff on output (old <> new)
10,11c10
< loop0(.LBB0_1,#998)
< r2 = #-4000
----------------
> loop0(.LBB0_1,#999)
15,21c14,15
< r3 = add(r0,r2)
< r4 = add(r2,#4)
< }
< {
< r2 = add(r0,r4)
< r4 = add(r4,#4)
< r3 = memw(r3+#4000)
------------------------
> r3 = add(r1,#4)
> r2 = memw(r0+r1<<#0)
27,30c21,23
< r1 = add(r3,r1)
< r2 = add(r0,r4)
< r4 = add(r4,#4)
< r3 = memw(r2+#4000)
------------------------
> r1 = add(r2,r1)
> r3 = add(r3,#4)
> r2 = memw(r0+r3<<#0)
34,38c27
< r0 = add(r3,r1)
< r2 = memw(r2+#4000)
< }
< {
< r0 = add(r2,r0)
--------------------
> r0 = add(r2,r1)
https://reviews.llvm.org/D35933
Files:
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
include/llvm/CodeGen/BasicTTIImpl.h
include/llvm/Target/TargetLowering.h
lib/Analysis/TargetTransformInfo.cpp
lib/Target/SystemZ/SystemZISelLowering.cpp
lib/Target/SystemZ/SystemZISelLowering.h
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/CodeGen/Hexagon/swp-const-tc.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35933.110349.patch
Type: text/x-patch
Size: 8994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170809/3d98b925/attachment.bin>
More information about the llvm-commits
mailing list