[PATCH] D67281: [AArch64][SimplifyCFG] Add additional cost for instructions in mergeConditionalStoreToAddress
Pavel Kosov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 08:38:06 PDT 2019
kpdev42 created this revision.
kpdev42 added reviewers: efriedma, craig.topper, sanjoy.
kpdev42 added a project: LLVM.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls.
There is a regression in AArch64 after commit https://reviews.llvm.org/rL317368.
Some blocks are considered worthwile to merge conditional stores, but these merges lead to unoptimal code (bug https://bugs.llvm.org/show_bug.cgi?id=43205 PR#43205 )
So it is needed to add some additional cost to instructions, if these instructions cannot be represented by 1 conditional instructions.
For example:
`add nsw i32 %tmp 1` can be represented as `cset`
`or` will be split in `csel` and `orr`
Repository:
rL LLVM
https://reviews.llvm.org/D67281
Files:
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/AArch64/check-instr-cost-for-folding.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67281.219108.patch
Type: text/x-patch
Size: 13408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190906/df9bc53c/attachment-0001.bin>
More information about the llvm-commits
mailing list