diff options
author | Sterling Augustine <saugustine@google.com> | 2019-12-06 17:09:19 -0800 |
---|---|---|
committer | Sterling Augustine <saugustine@google.com> | 2019-12-06 17:09:19 -0800 |
commit | aa3c877fb58db238a86e734511bdeed9bc40086c (patch) | |
tree | 7e0b74f8a01f98da2dc76b81fe4b60a8e2556171 | |
parent | 5253d9138eb31252594f5e14133df731551839c7 (diff) | |
download | bcm5719-llvm-aa3c877fb58db238a86e734511bdeed9bc40086c.tar.gz bcm5719-llvm-aa3c877fb58db238a86e734511bdeed9bc40086c.zip |
Move variable only used in an assert into the assert itself.
This prevents unused variable warnings from breaking the build.
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp index d44dbf76598..29fa8c0f963 100644 --- a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp @@ -1010,8 +1010,7 @@ bool AArch64InstructionSelector::selectCompareBranch( /// This needs to detect a splat-like operation, e.g. a G_BUILD_VECTOR. static Optional<int64_t> getVectorShiftImm(Register Reg, MachineRegisterInfo &MRI) { - const LLT Ty = MRI.getType(Reg); - assert(Ty.isVector() && "Expected a *vector* shift operand"); + assert(MRI.getType(Reg).isVector() && "Expected a *vector* shift operand"); MachineInstr *OpMI = MRI.getVRegDef(Reg); assert(OpMI && "Expected to find a vreg def for vector shift operand"); if (OpMI->getOpcode() != TargetOpcode::G_BUILD_VECTOR) |