[lld] r334647 - Remove needless bitwise-AND.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 13 12:58:34 PDT 2018
Author: ruiu
Date: Wed Jun 13 12:58:33 2018
New Revision: 334647
URL: http://llvm.org/viewvc/llvm-project?rev=334647&view=rev
Log:
Remove needless bitwise-AND.
Because applyMask ignores upper bits, we don't need to mask them.
Modified:
lld/trunk/ELF/Arch/Hexagon.cpp
Modified: lld/trunk/ELF/Arch/Hexagon.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/Hexagon.cpp?rev=334647&r1=334646&r2=334647&view=diff
==============================================================================
--- lld/trunk/ELF/Arch/Hexagon.cpp (original)
+++ lld/trunk/ELF/Arch/Hexagon.cpp Wed Jun 13 12:58:33 2018
@@ -67,7 +67,7 @@ void Hexagon::relocateOne(uint8_t *Loc,
case R_HEX_NONE:
break;
case R_HEX_B22_PCREL:
- or32le(Loc, applyMask(0x01ff3ffe, ((Val >> 2) & 0x3fffff)));
+ or32le(Loc, applyMask(0x1ff3ffe, Val >> 2));
break;
default:
error(getErrorLocation(Loc) + "unrecognized reloc " + toString(Type));
More information about the llvm-commits
mailing list