diff options
author | Nicolai Haehnle <nhaehnle@gmail.com> | 2017-11-28 08:41:50 +0000 |
---|---|---|
committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2017-11-28 08:41:50 +0000 |
commit | 39980dac0b1724cea2a64a2ee76ce35df6dbf0b6 (patch) | |
tree | 4198b5d61f222332bbee9588cbd95b22e3ff77d7 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | a46522f369ca9a84127293ed07ca955c1b155782 (diff) | |
download | llvm-39980dac0b1724cea2a64a2ee76ce35df6dbf0b6.zip llvm-39980dac0b1724cea2a64a2ee76ce35df6dbf0b6.tar.gz llvm-39980dac0b1724cea2a64a2ee76ce35df6dbf0b6.tar.bz2 |
AMDGPU: Consistently check for immediates in SIInstrInfo::FoldImmediate
Summary:
The PeepholeOptimizer pass calls this function solely based on checking
DefMI->isMoveImmediate(), which only checks the MoveImm bit of the
instruction description. So it's up to FoldImmediate itself to properly
check that DefMI *actually* moves from an immediate.
I don't have a separate test case for this, but the next patch introduces
a test case which happens to crash without this change.
This error is caught by the assertion in MachineOperand::getImm().
Change-Id: I88e7cdbcf54d75e1a296822e6fe5f9a5f095bbf8
Reviewers: arsenm, rampitec
Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D40342
llvm-svn: 319155
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions