diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2014-09-15 18:23:52 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2014-09-15 18:23:52 +0000 |
commit | 760814a7e16547edd7040c823ea38469942269ef (patch) | |
tree | d749b92457b9898848057ba91d193a4196e7944b /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | fdacdb26afab4381db0f733d4fcc28b1ec0bcc95 (diff) | |
download | llvm-760814a7e16547edd7040c823ea38469942269ef.zip llvm-760814a7e16547edd7040c823ea38469942269ef.tar.gz llvm-760814a7e16547edd7040c823ea38469942269ef.tar.bz2 |
[X86] Fix a bug in X86's peephole optimization.
Peephole optimization was folding MOVSDrm, which is a zero-extending double
precision floating point load, into ADDPDrr, which is a SIMD add of two packed
double precision floating point values.
(before)
%vreg21<def> = MOVSDrm <fi#0>, 1, %noreg, 0, %noreg; mem:LD8[%7](align=16)(tbaa=<badref>) VR128:%vreg21
%vreg23<def,tied1> = ADDPDrr %vreg20<tied0>, %vreg21; VR128:%vreg23,%vreg20,%vreg21
(after)
%vreg23<def,tied1> = ADDPDrm %vreg20<tied0>, <fi#0>, 1, %noreg, 0, %noreg; mem:LD8[%7](align=16)(tbaa=<badref>) VR128:%vreg23,%vreg20
X86InstrInfo::foldMemoryOperandImpl already had the logic that prevented this
from happening. However the check wasn't being conducted for loads from stack
objects. This commit factors out the logic into a new function and uses it for
checking loads from stack slots are not zero-extending loads.
rdar://problem/18236850
llvm-svn: 217799
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions