aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2010-02-15 16:48:31 +0000
committerDavid Greene <greened@obbligato.org>2010-02-15 16:48:31 +0000
commitba2b297ca53cd685ba397177e9d2d8c239da971e (patch)
tree4ac86e3c59a3f3341519f93f3d0eec0bd6eeeb74 /lib/CodeGen
parentb0bc6c361da9009e8414efde317d9bbff755f6c0 (diff)
downloadexternal_llvm-ba2b297ca53cd685ba397177e9d2d8c239da971e.zip
external_llvm-ba2b297ca53cd685ba397177e9d2d8c239da971e.tar.gz
external_llvm-ba2b297ca53cd685ba397177e9d2d8c239da971e.tar.bz2
Add non-temporal flags to MachineMemOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/MachineInstr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index df61c74..b6d98e8 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -305,7 +305,7 @@ void MachineOperand::print(raw_ostream &OS, const TargetMachine *TM) const {
MachineMemOperand::MachineMemOperand(const Value *v, unsigned int f,
int64_t o, uint64_t s, unsigned int a)
: Offset(o), Size(s), V(v),
- Flags((f & 7) | ((Log2_32(a) + 1) << 3)) {
+ Flags((f & ((1 << MOMaxBits) - 1)) | ((Log2_32(a) + 1) << MOMaxBits)) {
assert(getBaseAlignment() == a && "Alignment is not a power of 2!");
assert((isLoad() || isStore()) && "Not a load/store!");
}
@@ -327,7 +327,8 @@ void MachineMemOperand::refineAlignment(const MachineMemOperand *MMO) {
if (MMO->getBaseAlignment() >= getBaseAlignment()) {
// Update the alignment value.
- Flags = (Flags & 7) | ((Log2_32(MMO->getBaseAlignment()) + 1) << 3);
+ Flags = (Flags & ((1 << MOMaxBits) - 1)) |
+ ((Log2_32(MMO->getBaseAlignment()) + 1) << MOMaxBits);
// Also update the base and offset, because the new alignment may
// not be applicable with the old ones.
V = MMO->getValue();