Skip to content

Commit b034872

Browse files
committed
Rename the option in the pass added
1 parent 6a6ade0 commit b034872

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

llvm/lib/Target/X86/X86SuppressAPXForReloc.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ using namespace llvm;
3333

3434
#define DEBUG_TYPE "x86-suppress-apx-for-relocation"
3535

36-
static cl::opt<bool> X86SuppressAPXForReloc(
37-
DEBUG_TYPE,
38-
cl::desc("Suppress APX features (EGPR, NDD and NF) for instructions with "
36+
static cl::opt<bool> X86EnableAPXForRelocation(
37+
"x86-enable-apx-for-relocation",
38+
cl::desc("Enable APX features (EGPR, NDD and NF) for instructions with "
3939
"relocations on x86-64 ELF"),
40-
cl::init(true));
40+
cl::init(false));
4141

4242
namespace {
4343
class X86SuppressAPXForRelocationPass : public MachineFunctionPass {
@@ -82,7 +82,7 @@ static void suppressEGPRRegClass(MachineFunction &MF, MachineInstr &MI,
8282
bool X86SuppressAPXForRelocationPass::runOnMachineFunction(
8383
MachineFunction &MF) {
8484
if (MF.getTarget().Options.MCOptions.X86APXRelaxRelocations ||
85-
!X86SuppressAPXForReloc)
85+
X86EnableAPXForRelocation)
8686
return false;
8787
const X86Subtarget &ST = MF.getSubtarget<X86Subtarget>();
8888
if (!ST.hasEGPR() && !ST.hasNDD() && !ST.hasNF())

llvm/test/CodeGen/X86/apx/tls.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
; RUN: ld.lld %t.o %t1.o -o %t.so
1919
; RUN: llvm-objdump --no-print-imm-hex -dr %t.so | FileCheck %s --check-prefix=GOTTPOFF_LD_NOAPXRELAX
2020

21-
; RUN: llc -mattr=+egpr %s -mtriple=x86_64 -filetype=obj -o %t.o -x86-suppress-apx-for-relocation=false
21+
; RUN: llc -mattr=+egpr %s -mtriple=x86_64 -filetype=obj -o %t.o -x86-enable-apx-for-relocation=true
2222
; RUN: llvm-objdump --no-print-imm-hex -dr %t.o | FileCheck %s --check-prefix=GOTTPOFF_NOAPXRELAX_APXINSTR
2323
; RUN: echo '.tbss; .globl b,c,d,e,f,g,h,i,j; b: .zero 4;c: .zero 4;d: .zero 4;e: .zero 4;f: .zero 4;g: .zero 4;h: .zero 4;i: .zero 4;j: .zero 4' | llvm-mc -filetype=obj -triple=x86_64 - -o %t1.o
2424
; RUN: ld.lld %t.o %t1.o -o %t.so

0 commit comments

Comments
 (0)