diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 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 8459b4ff2a..07376848c4 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. |