diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2021-01-13 20:30:25 -0800 |
---|---|---|
committer | Jordan Rupprecht <rupprecht@google.com> | 2021-01-13 20:32:38 -0800 |
commit | 752fafda3dbf1f4885c64408a13ddb67c91ccb13 (patch) | |
tree | bd42ef2385ed6cc7f0b5b437d595f13293b2c14d | |
parent | 3043e5a5c33c4c871f4a1dfd621a8839f9a1f0b3 (diff) | |
download | llvm-752fafda3dbf1f4885c64408a13ddb67c91ccb13.tar.gz |
[NFC] Fix -Wsometimes-uninitialized
After 49142991a685bd427d7e877c29c77371dfb7634c, clang detects that MUL may be uninitialized. Set it to nullptr to suppress this check.
Adding an assert to check that it is ultimately set fails two test cases. Since this is not a new issue, leave the assertion commented out until a code owner can fix the bug. The two failing test cases are noted in the assertion comment.
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstrInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp index 888d3c113c91..6b38e216a854 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp @@ -4871,7 +4871,7 @@ void AArch64InstrInfo::genAlternativeCodeSequence( MachineFunction &MF = *MBB.getParent(); const TargetInstrInfo *TII = MF.getSubtarget().getInstrInfo(); - MachineInstr *MUL; + MachineInstr *MUL = nullptr; const TargetRegisterClass *RC; unsigned Opc; switch (Pattern) { @@ -5692,6 +5692,9 @@ void AArch64InstrInfo::genAlternativeCodeSequence( } } // end switch (Pattern) // Record MUL and ADD/SUB for deletion + // FIXME: This assertion fails in CodeGen/AArch64/tailmerging_in_mbp.ll and + // CodeGen/AArch64/urem-seteq-nonzero.ll. + // assert(MUL && "MUL was never set"); DelInstrs.push_back(MUL); DelInstrs.push_back(&Root); } |