aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-21 21:18:03 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-21 21:18:03 +0000
commit2c6b5a8d33a650b9a5b838f6bc8887c8f195f944 (patch)
treec4ae546e1590298c2a7c5e66baf47d5309784e2e /lib/Target
parent94a720c73e11f8b2f532d3dfb4e145c6b35a2ea2 (diff)
downloadexternal_llvm-2c6b5a8d33a650b9a5b838f6bc8887c8f195f944.zip
external_llvm-2c6b5a8d33a650b9a5b838f6bc8887c8f195f944.tar.gz
external_llvm-2c6b5a8d33a650b9a5b838f6bc8887c8f195f944.tar.bz2
Fix the SETHIimm pattern for 64-bit code.
Don't ignore the high 32 bits of the immediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/Sparc/SparcInstrInfo.td3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Target/Sparc/SparcInstrInfo.td b/lib/Target/Sparc/SparcInstrInfo.td
index 07e07f1..baefb06 100644
--- a/lib/Target/Sparc/SparcInstrInfo.td
+++ b/lib/Target/Sparc/SparcInstrInfo.td
@@ -64,8 +64,7 @@ def HI22 : SDNodeXForm<imm, [{
}]>;
def SETHIimm : PatLeaf<(imm), [{
- return (((unsigned)N->getZExtValue() >> 10) << 10) ==
- (unsigned)N->getZExtValue();
+ return isShiftedUInt<22, 10>(N->getZExtValue());
}], HI22>;
// Addressing modes.