commit | ffd8662558b8db500117c92d16f6f82edbc894a7 | [log] [tgz] |
---|---|---|
author | Craig Topper <craig.topper@intel.com> | Tue Apr 02 20:52:10 2019 +0000 |
committer | Craig Topper <craig.topper@intel.com> | Tue Apr 02 20:52:10 2019 +0000 |
tree | 22d5f8375eca307524ef6f741fcbc48d55a4ffc3 | |
parent | b64f915ae0fdd3b6d0a46f17b2d30367f2d56c0b [diff] |
[X86] Check MI.isConvertibleTo3Addr() before calling convertToThreeAddress in X86FixupLEAs. X86FixupLEAs just assumes convertToThreeAddress will return nullptr for any instruction that isn't convertible. But the code in convertToThreeAddress for X86 assumes that any instruction coming in has at least 2 operands and that the second one is a register. But those properties aren't guaranteed of all instructions. We should check the instruction property first. llvm-svn: 357528