summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2015-08-10 16:43:20 +0000
committerSanjay Patel <spatel@rotateright.com>2015-08-10 16:43:20 +0000
commit9a9003d94cf5e21ea15dbc58d5ec2f6cca6fb8b6 (patch)
treef601afccbfca39cab1213f87e54285c38dc3a42a /llvm/lib
parent347663b21406304c703409b307642a8e0df68ccc (diff)
downloadbcm5719-llvm-9a9003d94cf5e21ea15dbc58d5ec2f6cca6fb8b6.tar.gz
bcm5719-llvm-9a9003d94cf5e21ea15dbc58d5ec2f6cca6fb8b6.zip
fix minsize detection: minsize attribute implies optimizing for size
llvm-svn: 244458
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 5b0161df4bd..b6f34bd3a18 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -5188,9 +5188,7 @@ static SDValue LowerVectorBroadcast(SDValue Op, const X86Subtarget* Subtarget,
// TODO: If multiple splats are generated to load the same constant,
// it may be detrimental to overall size. There needs to be a way to detect
// that condition to know if this is truly a size win.
- const Function *F = DAG.getMachineFunction().getFunction();
- // FIXME: Use Function::optForSize().
- bool OptForSize = F->hasFnAttribute(Attribute::OptimizeForSize);
+ bool OptForSize = DAG.getMachineFunction().getFunction()->optForSize();
// Handle broadcasting a single constant scalar from the constant pool
// into a vector.
OpenPOWER on IntegriCloud