[llvm] bc3e71a - [llvm-exegesis][NFC] Fix unused function 'IsMovRegToReg' warning

Jake Egan via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 10:02:32 PDT 2023


Author: Jake Egan
Date: 2023-06-27T13:01:08-04:00
New Revision: bc3e71a945cdedcde7836a7b6c5c467ac62a9f7d

URL: https://github.com/llvm/llvm-project/commit/bc3e71a945cdedcde7836a7b6c5c467ac62a9f7d
DIFF: https://github.com/llvm/llvm-project/commit/bc3e71a945cdedcde7836a7b6c5c467ac62a9f7d.diff

LOG: [llvm-exegesis][NFC] Fix unused function 'IsMovRegToReg' warning

/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/tools/llvm-exegesis/X86/TargetTest.cpp:88:17: error: unused function 'IsMovRegToReg' [-Werror,-Wunused-function]
Matcher<MCInst> IsMovRegToReg(unsigned Opcode, int64_t Reg1, int64_t Reg2) {
1 error generated.

Added: 
    

Modified: 
    llvm/unittests/tools/llvm-exegesis/X86/TargetTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/tools/llvm-exegesis/X86/TargetTest.cpp b/llvm/unittests/tools/llvm-exegesis/X86/TargetTest.cpp
index 92d656423c285..aa5d525f24eb7 100644
--- a/llvm/unittests/tools/llvm-exegesis/X86/TargetTest.cpp
+++ b/llvm/unittests/tools/llvm-exegesis/X86/TargetTest.cpp
@@ -85,9 +85,11 @@ Matcher<MCInst> IsMovImmediate(unsigned Opcode, int64_t Reg, int64_t Value) {
   return AllOf(OpcodeIs(Opcode), ElementsAre(IsReg(Reg), IsImm(Value)));
 }
 
+#ifdef __linux__
 Matcher<MCInst> IsMovRegToReg(unsigned Opcode, int64_t Reg1, int64_t Reg2) {
   return AllOf(OpcodeIs(Opcode), ElementsAre(IsReg(Reg1), IsReg(Reg2)));
 }
+#endif
 
 Matcher<MCInst> IsMovValueToStack(unsigned Opcode, int64_t Value,
                                   size_t Offset) {


        


More information about the llvm-commits mailing list