aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2017-11-28 08:41:50 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2017-11-28 08:41:50 +0000
commit39980dac0b1724cea2a64a2ee76ce35df6dbf0b6 (patch)
tree4198b5d61f222332bbee9588cbd95b22e3ff77d7 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parenta46522f369ca9a84127293ed07ca955c1b155782 (diff)
downloadllvm-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