diff options
| author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-03-08 15:46:28 +0000 |
|---|---|---|
| committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-03-08 15:46:28 +0000 |
| commit | 1b7197e690a7055a0992bae76e996f0b04d52a61 (patch) | |
| tree | a83c6afc9facc50b64d7113fb6df4422e4ad91e7 /llvm/lib/Target | |
| parent | 76b6bd355d274f6eb74417a40ea87e8734d8baa4 (diff) | |
| download | bcm5719-llvm-1b7197e690a7055a0992bae76e996f0b04d52a61.tar.gz bcm5719-llvm-1b7197e690a7055a0992bae76e996f0b04d52a61.zip | |
[Hexagon] Use correct offset when extracting from the high word
When extracting a bitfield from the high register in a register pair,
the final offset should be relative to the high register (for 32-bit
extracts).
llvm-svn: 297288
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp b/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp index 5fef6083552..41d4f6c17e8 100644 --- a/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp +++ b/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp @@ -2480,6 +2480,7 @@ bool BitSimplification::simplifyExtractLow(MachineInstr *MI, continue; if (RW != SW) SR = (Off/RW == 0) ? Hexagon::isub_lo : Hexagon::isub_hi; + Off = Off % RW; if (!validateReg({R,SR}, ExtOpc, 1)) continue; |

