[PATCH] D72831: [llvm-mc] - Produce R_X86_64_PLT32 relocation for branches with JCC opcodes too.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 24 11:38:10 PST 2020
MaskRay added a comment.
In D72831#1839293 <https://reviews.llvm.org/D72831#1839293>, @smeenai wrote:
> CC @hans ... there was discussion in https://bugs.llvm.org/show_bug.cgi?id=44397 about whether this is worth picking to 10.0.
This is related to CodeGen/BranchFolding.cpp (D29856 <https://reviews.llvm.org/D29856>).
I think certain -Os and -Oz code with static relocation model could create such `bne foo` with R_X86_64_PC32. If the target is defined in a shared object, it will create a canonical PLT.
It does not hurt to include it in release/10.x but I also don't think there is a demanding need.
define void @foo(i32* %a) minsize {
entry:
%0 = load i32, i32* %a
%cmp = icmp eq i32 %0, 0
br i1 %cmp, label %if.then, label %if.else
if.then:
tail call void @bar()
br label %if.else
if.else:
ret void
}
declare void @bar()
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72831/new/
https://reviews.llvm.org/D72831
More information about the llvm-commits
mailing list