summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCast.cpp
diff options
context:
space:
mode:
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>2018-10-30 20:16:39 +0000
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>2018-10-30 20:16:39 +0000
commitfe09a20f09a290274ea81d1703d4106e06a11f94 (patch)
treedd011f65def4053346cb66eb78efb297ca17f32d /clang/lib/Sema/SemaCast.cpp
parentfa03c690bd55e58fe8c8b13a9b4525e8b8cb2c9f (diff)
downloadbcm5719-llvm-fe09a20f09a290274ea81d1703d4106e06a11f94.tar.gz
bcm5719-llvm-fe09a20f09a290274ea81d1703d4106e06a11f94.zip
[DAGCombiner] Fix for big endian in ForwardStoreValueToDirectLoad
Summary: Normalize the offset for endianess before checking if the store cover the load in ForwardStoreValueToDirectLoad. Without this we missed out on some optimizations for big endian targets. If for example having a 4 bytes store followed by a 1 byte load, loading the least significant byte from the store, the STCoversLD check would fail (see @test4 in test/CodeGen/AArch64/load-store-forwarding.ll). This patch also fixes a problem seen in an out-of-tree target. The target has i40 as a legal type, it is big endian, and the StoreSize for i40 is 48 bits. So when normalizing the offset for endianess we need to take the StoreSize into account (assuming that padding added when storing into a larger StoreSize always is added at the most significant end). Reviewers: niravd Reviewed By: niravd Subscribers: javed.absar, kristof.beyls, llvm-commits, uabelho Differential Revision: https://reviews.llvm.org/D53776 llvm-svn: 345636
Diffstat (limited to 'clang/lib/Sema/SemaCast.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud