OSDN Git Service

[SystemZ] Improve isFoldableLoad() for Sub, SDiv and UDiv.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Tue, 30 Oct 2018 13:41:03 +0000 (13:41 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Tue, 30 Oct 2018 13:41:03 +0000 (13:41 +0000)
commitbb950aec63a9579dc71de2329554862130f742a0
treeb2aeb31dae41f1d2f105d7676c9b0428e597ed9a
parent0d3744e3d7024e723cc6a09f99141f9e590d1549
[SystemZ]  Improve isFoldableLoad() for Sub, SDiv and UDiv.

Sub, SDiv and UDiv are not commutative, so only the RHS operand can fold a
load. This patch adds a check for this.

Review: Ulrich Weigand
https://reviews.llvm.org/D53791

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345596 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
test/Analysis/CostModel/SystemZ/memop-folding-int-arith.ll