diff options
author | Tim Northover <tnorthover@apple.com> | 2019-08-06 13:34:08 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2019-08-06 13:34:08 +0000 |
commit | b5abc425d27fe069db93e8879743ae691b298006 (patch) | |
tree | 061e702abbddda2e14b964baede68b1481c35e31 /llvm/lib/Target/AArch64 | |
parent | 9eee4254796df1a34a0452fa91e8ce4e38b6a5bb (diff) | |
download | bcm5719-llvm-b5abc425d27fe069db93e8879743ae691b298006.tar.gz bcm5719-llvm-b5abc425d27fe069db93e8879743ae691b298006.zip |
AArch64: bail instead of asserting on unexpected type in G_CONSTANT 0.
llvm-svn: 368031
Diffstat (limited to 'llvm/lib/Target/AArch64')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp index 59cfcca3157..c3c1825f931 100644 --- a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp @@ -1296,8 +1296,8 @@ bool AArch64InstructionSelector::earlySelect(MachineInstr &I) const { Register DefReg = I.getOperand(0).getReg(); LLT Ty = MRI.getType(DefReg); - assert((Ty == LLT::scalar(64) || Ty == LLT::scalar(32)) && - "Unexpected legal constant type"); + if (Ty != LLT::scalar(64) && Ty != LLT::scalar(32)) + return false; if (Ty == LLT::scalar(64)) { I.getOperand(1).ChangeToRegister(AArch64::XZR, false); |