aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOperand.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-01-31 01:38:47 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-01-31 01:38:47 +0000
commit2a64598ef2ec4841dd48483dc368da034d80d933 (patch)
tree158052ad93e61e7d7e8879f984057f9074e63fad /llvm/lib/CodeGen/MachineOperand.cpp
parent15df273eb45dc53669739bb33388a12c1dfce962 (diff)
downloadllvm-2a64598ef2ec4841dd48483dc368da034d80d933.zip
llvm-2a64598ef2ec4841dd48483dc368da034d80d933.tar.gz
llvm-2a64598ef2ec4841dd48483dc368da034d80d933.tar.bz2
GlobalISel: Fix creating MMOs with align 0
llvm-svn: 352712
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOperand.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp
index ac0fe3006..3ff7a3c 100644
--- a/llvm/lib/CodeGen/MachineOperand.cpp
+++ b/llvm/lib/CodeGen/MachineOperand.cpp
@@ -993,7 +993,7 @@ MachineMemOperand::MachineMemOperand(MachinePointerInfo ptrinfo, Flags f,
assert((PtrInfo.V.isNull() || PtrInfo.V.is<const PseudoSourceValue *>() ||
isa<PointerType>(PtrInfo.V.get<const Value *>()->getType())) &&
"invalid pointer value");
- assert(getBaseAlignment() == a && "Alignment is not a power of 2!");
+ assert(getBaseAlignment() == a && a != 0 && "Alignment is not a power of 2!");
assert((isLoad() || isStore()) && "Not a load/store!");
AtomicInfo.SSID = static_cast<unsigned>(SSID);