[llvm] 94daee2 - [ARM] Remove unused functions isExpImmValue, isExpImm, and isInvertedExpImm
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 09:06:11 PDT 2023
Author: Kazu Hirata
Date: 2023-05-24T09:05:50-07:00
New Revision: 94daee2e737cec1157c8a2b25846a40251271b9c
URL: https://github.com/llvm/llvm-project/commit/94daee2e737cec1157c8a2b25846a40251271b9c
DIFF: https://github.com/llvm/llvm-project/commit/94daee2e737cec1157c8a2b25846a40251271b9c.diff
LOG: [ARM] Remove unused functions isExpImmValue, isExpImm, and isInvertedExpImm
The last uses were removed by:
commit 772e4931932270a82f38c83d4344c800b2f54eff
Author: Simon Tatham <simon.tatham at arm.com>
Date: Thu Jan 23 11:53:27 2020 +0000
Differential Revision: https://reviews.llvm.org/D151299
Added:
Modified:
llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 6391aa30575eb..95fb27f9f63dd 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -1260,34 +1260,6 @@ class ARMOperand : public MCParsedAsmOperand {
return isImmediate<1, 33>();
}
- template<int shift>
- bool isExpImmValue(uint64_t Value) const {
- uint64_t mask = (1 << shift) - 1;
- if ((Value & mask) != 0 || (Value >> shift) > 0xff)
- return false;
- return true;
- }
-
- template<int shift>
- bool isExpImm() const {
- if (!isImm()) return false;
- const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
- if (!CE) return false;
-
- return isExpImmValue<shift>(CE->getValue());
- }
-
- template<int shift, int size>
- bool isInvertedExpImm() const {
- if (!isImm()) return false;
- const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(getImm());
- if (!CE) return false;
-
- uint64_t OriginalValue = CE->getValue();
- uint64_t InvertedValue = OriginalValue ^ (((uint64_t)1 << size) - 1);
- return isExpImmValue<shift>(InvertedValue);
- }
-
bool isPKHLSLImm() const {
return isImmediate<0, 32>();
}
More information about the llvm-commits
mailing list