summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-10-17 17:52:35 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-10-17 17:52:35 +0000
commita10c09804d92db4f41fd0df29ea3c0346e297c59 (patch)
treee82d4aecfee86e3d760cc42c5b766eb410a833ea /llvm/lib
parent086da3411969af31c55faeecda722939ec99c4d9 (diff)
downloadbcm5719-llvm-a10c09804d92db4f41fd0df29ea3c0346e297c59.tar.gz
bcm5719-llvm-a10c09804d92db4f41fd0df29ea3c0346e297c59.zip
Check for empty YMM use-def lists in X86VZeroUpper.
The previous MRI.isPhysRegUsed(YMM0) would also return true when the function contains a call to a function that may clobber YMM0. That's most of them. Checking the use-def chains allows us to skip functions that don't explicitly mention YMM registers. llvm-svn: 166110
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86VZeroUpper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86VZeroUpper.cpp b/llvm/lib/Target/X86/X86VZeroUpper.cpp
index 449eed3d8d5..c4a58874a41 100644
--- a/llvm/lib/Target/X86/X86VZeroUpper.cpp
+++ b/llvm/lib/Target/X86/X86VZeroUpper.cpp
@@ -147,7 +147,7 @@ bool VZeroUpperInserter::runOnMachineFunction(MachineFunction &MF) {
const TargetRegisterClass *RC = &X86::VR256RegClass;
for (TargetRegisterClass::iterator i = RC->begin(), e = RC->end();
i != e; i++) {
- if (MRI.isPhysRegUsed(*i)) {
+ if (!MRI.reg_nodbg_empty(*i)) {
YMMUsed = true;
break;
}
OpenPOWER on IntegriCloud