mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
fix minsize detection: minsize attribute implies optimizing for size
llvm-svn: 244499
This commit is contained in:
parent
d7a321e834
commit
bea667f5ae
@ -5347,11 +5347,8 @@ MachineInstr *X86InstrInfo::foldMemoryOperandImpl(
|
||||
// Check switch flag
|
||||
if (NoFusing) return nullptr;
|
||||
|
||||
// Unless optimizing for size, don't fold to avoid partial
|
||||
// register update stalls
|
||||
// FIXME: Use Function::optForSize().
|
||||
if (!MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize) &&
|
||||
hasPartialRegUpdate(MI->getOpcode()))
|
||||
// Avoid partial register update stalls unless optimizing for size.
|
||||
if (!MF.getFunction()->optForSize() && hasPartialRegUpdate(MI->getOpcode()))
|
||||
return nullptr;
|
||||
|
||||
// Determine the alignment of the load.
|
||||
|
@ -113,9 +113,8 @@ define <2 x double> @load_fold_cvtss2sd_int_optsize(<4 x float> *%a) optsize {
|
||||
|
||||
define <2 x double> @load_fold_cvtss2sd_int_minsize(<4 x float> *%a) minsize {
|
||||
; CHECK-LABEL: load_fold_cvtss2sd_int_minsize:
|
||||
; CHECK: movaps (%rdi), %xmm1
|
||||
; CHECK-NEXT: xorps %xmm0, %xmm0
|
||||
; CHECK-NEXT: cvtss2sd %xmm1, %xmm0
|
||||
; CHECK: xorps %xmm0, %xmm0
|
||||
; CHECK-NEXT: cvtss2sd (%rdi), %xmm0
|
||||
; CHECK-NEXT: retq
|
||||
%ld = load <4 x float>, <4 x float> *%a
|
||||
%x = call <2 x double> @llvm.x86.sse2.cvtss2sd(<2 x double> <double 0x0, double 0x0>, <4 x float> %ld)
|
||||
|
Loading…
Reference in New Issue
Block a user