diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-11-09 23:17:42 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-11-09 23:17:42 +0000 |
commit | 1579287550505d49e2cb1adcd696bfbe6f969db0 (patch) | |
tree | 9692bbc078288889751fea59cecfce90830e8906 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 8ad00b26eee7044ca0e6912e0b3be770526ec8e8 (diff) | |
download | bcm5719-llvm-1579287550505d49e2cb1adcd696bfbe6f969db0.tar.gz bcm5719-llvm-1579287550505d49e2cb1adcd696bfbe6f969db0.zip |
The method of doing the matching with a 'select' instruction was wrong. The
original code was matching like this:
if (match(A, m_Not(m_Value(B))))
B was already matched as a 'select' instruction. However, this isn't matching
what we think it's matching. It would match B as a 'Value', so basically
anything would match to it. In this case, a Constant matched. B was replaced
with a constant representation. And then the wrong value would be used in the
SelectInst::Create statement, causing a crash.
After thinking on this for a moment, and after Nick L. told me how the pattern
matching stuff was supposed to work, the solution was to match NOT an m_Value,
but an m_Select.
llvm-svn: 58946
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions