[llvm] CodeGenPrepare: Remove threadlocal_address intrinsic when cheap to recompute. (PR #87844)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 02:34:41 PDT 2024
================
@@ -5082,6 +5082,16 @@ bool AddressingModeMatcher::matchOperationAddr(User *AddrInst, unsigned Opcode,
}
return true;
}
+ case Instruction::Call:
+ if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(AddrInst)) {
+ if (II->getIntrinsicID() == Intrinsic::threadlocal_address) {
+ GlobalValue &GV = cast<GlobalValue>(*II->getArgOperand(0));
+ if (TLI.addressingModeSupportsTLS(GV)) {
----------------
nikic wrote:
No braces on single-line if.
https://github.com/llvm/llvm-project/pull/87844
More information about the llvm-commits
mailing list