summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-09-14 12:06:40 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-09-14 12:06:40 +0000
commit473d02dbacb23c9080870abee1303d7c497cbd68 (patch)
tree43e319effa7c87af10840ef17384d7de82f82db9 /llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
parentab68449c537989b8761228c10401aa6d6f075272 (diff)
downloadbcm5719-llvm-473d02dbacb23c9080870abee1303d7c497cbd68.tar.gz
bcm5719-llvm-473d02dbacb23c9080870abee1303d7c497cbd68.zip
[Hexagon] Make getMemAccessSize return size in bytes
It used to return the actual field value from the instruction descriptor. There is no reason for that, that value is not interesting in any way and the specifics of its encoding in the descriptor should not be exposed. llvm-svn: 313257
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
index f8da40a7bc3..662223ccb00 100644
--- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
@@ -2103,7 +2103,7 @@ void HexagonFrameLowering::optimizeSpillSlots(MachineFunction &MF,
}
if (!Bad) {
// Check sizes.
- unsigned S = (1U << (HII.getMemAccessSize(In) - 1));
+ unsigned S = HII.getMemAccessSize(In);
if (SI.Size != 0 && SI.Size != S)
Bad = true;
else
@@ -2312,7 +2312,7 @@ void HexagonFrameLowering::optimizeSpillSlots(MachineFunction &MF,
MachineInstr *CopyOut = nullptr;
if (DstR != FoundR) {
DebugLoc DL = MI.getDebugLoc();
- unsigned MemSize = (1U << (HII.getMemAccessSize(MI) - 1));
+ unsigned MemSize = HII.getMemAccessSize(MI);
assert(HII.getAddrMode(MI) == HexagonII::BaseImmOffset);
unsigned CopyOpc = TargetOpcode::COPY;
if (HII.isSignExtendingLoad(MI))
OpenPOWER on IntegriCloud