summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2014-12-16 21:57:18 +0000
committerSanjay Patel <spatel@rotateright.com>2014-12-16 21:57:18 +0000
commit7129c10cae224b1b5a437589794906ef08a84c07 (patch)
treec6c6616f468951a1be0ab396e3593ace92d84541 /clang/lib/Sema/SemaExprCXX.cpp
parentfd8de1c3ae3c3ac1c162a03572519d0ab0c2cf71 (diff)
downloadbcm5719-llvm-7129c10cae224b1b5a437589794906ef08a84c07.tar.gz
bcm5719-llvm-7129c10cae224b1b5a437589794906ef08a84c07.zip
merge consecutive loads that are offset from a base address
SelectionDAG::isConsecutiveLoad() was not detecting consecutive loads when the first load was offset from a base address. This patch recognizes that pattern and subtracts the offset before comparing the second load to see if it is consecutive. The codegen change in the new test case improves from: vmovsd 32(%rdi), %xmm0 vmovsd 48(%rdi), %xmm1 vmovhpd 56(%rdi), %xmm1, %xmm1 vmovhpd 40(%rdi), %xmm0, %xmm0 vinsertf128 $1, %xmm1, %ymm0, %ymm0 To: vmovups 32(%rdi), %ymm0 An existing test case is also improved from: vmovsd (%rdi), %xmm0 vmovsd 16(%rdi), %xmm1 vmovsd 24(%rdi), %xmm2 vunpcklpd %xmm2, %xmm0, %xmm0 ## xmm0 = xmm0[0],xmm2[0] vmovhpd 8(%rdi), %xmm1, %xmm3 To: vmovsd (%rdi), %xmm0 vmovsd 16(%rdi), %xmm1 vmovhpd 24(%rdi), %xmm0, %xmm0 vmovhpd 8(%rdi), %xmm1, %xmm1 This patch fixes PR21771 ( http://llvm.org/bugs/show_bug.cgi?id=21771 ). Differential Revision: http://reviews.llvm.org/D6642 llvm-svn: 224379
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud