diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h')
-rw-r--r-- | contrib/libs/llvm12/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/contrib/libs/llvm12/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h b/contrib/libs/llvm12/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h index 07376848c4..8459b4ff2a 100644 --- a/contrib/libs/llvm12/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h +++ b/contrib/libs/llvm12/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h @@ -205,20 +205,20 @@ namespace ARM_AM { return V; } - /// isSOImmTwoPartValNeg - Return true if the specified value can be obtained - /// by two SOImmVal, that -V = First + Second. - /// "R+V" can be optimized to (sub (sub R, First), Second). - /// "R=V" can be optimized to (sub (mvn R, ~(-First)), Second). - inline bool isSOImmTwoPartValNeg(unsigned V) { - unsigned First; - if (!isSOImmTwoPartVal(-V)) - return false; - // Return false if ~(-First) is not a SoImmval. - First = getSOImmTwoPartFirst(-V); - First = ~(-First); - return !(rotr32(~255U, getSOImmValRotate(First)) & First); - } - + /// isSOImmTwoPartValNeg - Return true if the specified value can be obtained + /// by two SOImmVal, that -V = First + Second. + /// "R+V" can be optimized to (sub (sub R, First), Second). + /// "R=V" can be optimized to (sub (mvn R, ~(-First)), Second). + inline bool isSOImmTwoPartValNeg(unsigned V) { + unsigned First; + if (!isSOImmTwoPartVal(-V)) + return false; + // Return false if ~(-First) is not a SoImmval. + First = getSOImmTwoPartFirst(-V); + First = ~(-First); + return !(rotr32(~255U, getSOImmValRotate(First)) & First); + } + /// getThumbImmValShift - Try to handle Imm with a 8-bit immediate followed /// by a left shift. Returns the shift amount to use. inline unsigned getThumbImmValShift(unsigned Imm) { @@ -687,18 +687,18 @@ namespace ARM_AM { return getFP16Imm(FPImm.bitcastToAPInt()); } - /// If this is a FP16Imm encoded as a fp32 value, return the 8-bit encoding - /// for it. Otherwise return -1 like getFP16Imm. - inline int getFP32FP16Imm(const APInt &Imm) { - if (Imm.getActiveBits() > 16) - return -1; - return ARM_AM::getFP16Imm(Imm.trunc(16)); - } - - inline int getFP32FP16Imm(const APFloat &FPImm) { - return getFP32FP16Imm(FPImm.bitcastToAPInt()); - } - + /// If this is a FP16Imm encoded as a fp32 value, return the 8-bit encoding + /// for it. Otherwise return -1 like getFP16Imm. + inline int getFP32FP16Imm(const APInt &Imm) { + if (Imm.getActiveBits() > 16) + return -1; + return ARM_AM::getFP16Imm(Imm.trunc(16)); + } + + inline int getFP32FP16Imm(const APFloat &FPImm) { + return getFP32FP16Imm(FPImm.bitcastToAPInt()); + } + /// getFP32Imm - Return an 8-bit floating-point version of the 32-bit /// floating-point value. If the value cannot be represented as an 8-bit /// floating-point value, then return -1. |