[llvm] 55fa7e1 - Sparc: Remove fishy VK_WPLT30 special case

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat May 3 23:05:28 PDT 2025


Author: Fangrui Song
Date: 2025-05-03T23:05:23-07:00
New Revision: 55fa7e1ef4851c3c773ea9c11a0ae01798d028c3

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

LOG: Sparc: Remove fishy VK_WPLT30 special case

I think 9fc29098dfa684de53dd180aa93e94c39c388631 (2014) was misguided
and added the unneeded special case. It probably wanted to handle
R_SPARC_WPLT30/R_SPARC_WDISP30 in PDC/PIC but it's not correct
to check the property in AsmParser.

Added: 
    

Modified: 
    llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp b/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
index 78fc1dad203c3..bec5381895245 100644
--- a/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
+++ b/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
@@ -1480,8 +1480,6 @@ SparcAsmParser::parseSparcAsmOperand(std::unique_ptr<SparcOperand> &Op,
     if (getParser().parseExpression(EVal, E))
       break;
 
-    if (isCall && getContext().getObjectFileInfo()->isPositionIndependent())
-      EVal = SparcMCExpr::create(SparcMCExpr::VK_WPLT30, EVal, getContext());
     Op = SparcOperand::CreateImm(EVal, S, E);
     break;
   }


        


More information about the llvm-commits mailing list