[ELF,test] Remove unneeded -relax-relocations from llvm-mc

This is option is x86-64 specific and should not be used by
AMDGPU/SystemZ. On x86-64, the option defaults to true and is
unnecessary.

GitOrigin-RevId: 2f1d79ee702148f452584367ddd0e3c81ecf3c64
diff --git a/test/ELF/amdgpu-duplicate-sym.s b/test/ELF/amdgpu-duplicate-sym.s
index db92dad..9423a2c 100644
--- a/test/ELF/amdgpu-duplicate-sym.s
+++ b/test/ELF/amdgpu-duplicate-sym.s
@@ -1,5 +1,5 @@
 # REQUIRES: amdgpu
-# RUN: llvm-mc -filetype=obj -triple amdgcn-amd-amdhsa -mcpu=gfx1031 --position-independent --relax-relocations %s -o %t.o
+# RUN: llvm-mc -filetype=obj -triple amdgcn-amd-amdhsa -mcpu=gfx1031 --position-independent %s -o %t.o
 
 # We use lld-link on purpose to exercise -flavor.
 # RUN: lld-link -flavor gnu -shared %t.o -o /dev/null
diff --git a/test/ELF/i386-relax-reloc.s b/test/ELF/i386-relax-reloc.s
index 7376af7..1db4939 100644
--- a/test/ELF/i386-relax-reloc.s
+++ b/test/ELF/i386-relax-reloc.s
@@ -1,5 +1,5 @@
 // REQUIRES: x86
-// RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o -relax-relocations
+// RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o
 // RUN: ld.lld -shared %t.o -o %t.so
 // RUN: llvm-readelf -S %t.so | FileCheck --check-prefix=SEC %s
 // RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t.so | FileCheck %s
diff --git a/test/ELF/systemz-gotent-relax-align.s b/test/ELF/systemz-gotent-relax-align.s
index c632608..125d74b 100644
--- a/test/ELF/systemz-gotent-relax-align.s
+++ b/test/ELF/systemz-gotent-relax-align.s
@@ -1,7 +1,7 @@
 # REQUIRES: systemz
 ## Verify that R_390_GOTENT optimization is not performed on misaligned symbols.
 
-# RUN: llvm-mc -filetype=obj -relax-relocations -triple=s390x-unknown-linux %s -o %t.o
+# RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %s -o %t.o
 # RUN: ld.lld %t.o -o %t1
 # RUN: llvm-readelf -S -r -x .got -x .got.plt %t1 | FileCheck --check-prefixes=CHECK %s
 # RUN: llvm-objdump --no-print-imm-hex -d %t1 | FileCheck --check-prefix=DISASM %s
diff --git a/test/ELF/systemz-gotent-relax-und-dso.s b/test/ELF/systemz-gotent-relax-und-dso.s
index 57369a4..fdbda70 100644
--- a/test/ELF/systemz-gotent-relax-und-dso.s
+++ b/test/ELF/systemz-gotent-relax-und-dso.s
@@ -1,6 +1,6 @@
 # REQUIRES: systemz
-# RUN: llvm-mc -filetype=obj -relax-relocations -triple=s390x-unknown-linux %s -o %t.o
-# RUN: llvm-mc -filetype=obj -relax-relocations -triple=s390x-unknown-linux %S/Inputs/gotpc-relax-und-dso.s -o %tdso.o
+# RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %s -o %t.o
+# RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %S/Inputs/gotpc-relax-und-dso.s -o %tdso.o
 # RUN: ld.lld -shared %tdso.o -soname=t.so -o %t.so
 # RUN: ld.lld --hash-style=sysv -shared %t.o %t.so -o %t
 # RUN: llvm-readelf -r %t | FileCheck --check-prefix=RELOC %s
diff --git a/test/ELF/systemz-gotent-relax.s b/test/ELF/systemz-gotent-relax.s
index f665e1a..7ff82b9 100644
--- a/test/ELF/systemz-gotent-relax.s
+++ b/test/ELF/systemz-gotent-relax.s
@@ -1,7 +1,7 @@
 # REQUIRES: systemz
 ## Test R_390_GOTENT optimization.
 
-# RUN: llvm-mc -filetype=obj -relax-relocations -triple=s390x-unknown-linux %s -o %t.o
+# RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %s -o %t.o
 # RUN: ld.lld %t.o -o %t1 --no-apply-dynamic-relocs
 # RUN: llvm-readelf -S -r -x .got.plt %t1 | FileCheck --check-prefixes=CHECK,NOAPPLY %s
 # RUN: ld.lld %t.o -o %t1 --apply-dynamic-relocs
diff --git a/test/ELF/x86-64-gotpc-relax-nopic.s b/test/ELF/x86-64-gotpc-relax-nopic.s
index cd12be8..7481904 100644
--- a/test/ELF/x86-64-gotpc-relax-nopic.s
+++ b/test/ELF/x86-64-gotpc-relax-nopic.s
@@ -1,5 +1,5 @@
 # REQUIRES: x86
-# RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-unknown-linux %s -o %t.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
 # RUN: ld.lld %t.o -o %t1
 # RUN: llvm-readobj --symbols -r %t1 | FileCheck --check-prefix=SYMRELOC %s
 # RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t1 | FileCheck --check-prefix=DISASM %s
diff --git a/test/ELF/x86-64-gotpc-relax-und-dso.s b/test/ELF/x86-64-gotpc-relax-und-dso.s
index 0704d2c..329b1db 100644
--- a/test/ELF/x86-64-gotpc-relax-und-dso.s
+++ b/test/ELF/x86-64-gotpc-relax-und-dso.s
@@ -1,6 +1,6 @@
 # REQUIRES: x86
-# RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-pc-linux %S/Inputs/gotpc-relax-und-dso.s -o %tdso.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/gotpc-relax-und-dso.s -o %tdso.o
 # RUN: ld.lld -shared %tdso.o -soname=t.so -o %t.so
 # RUN: ld.lld --hash-style=sysv -shared %t.o %t.so -o %t
 # RUN: llvm-readobj -r -S %t | FileCheck --check-prefix=RELOC %s
diff --git a/test/ELF/x86-64-gotpc-relax.s b/test/ELF/x86-64-gotpc-relax.s
index de858bf..5945bfc 100644
--- a/test/ELF/x86-64-gotpc-relax.s
+++ b/test/ELF/x86-64-gotpc-relax.s
@@ -1,7 +1,7 @@
 # REQUIRES: x86
 ## Test R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX GOT optimization.
 
-# RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-unknown-linux %s -o %t.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
 # RUN: ld.lld %t.o -o %t1 --no-apply-dynamic-relocs
 # RUN: llvm-readelf -S -r -x .got.plt %t1 | FileCheck --check-prefixes=CHECK,NOAPPLY %s
 # RUN: ld.lld %t.o -o %t1 --apply-dynamic-relocs
diff --git a/test/ELF/x86-64-relax-got-abs.s b/test/ELF/x86-64-relax-got-abs.s
index 9af63ac..b88e3cc 100644
--- a/test/ELF/x86-64-relax-got-abs.s
+++ b/test/ELF/x86-64-relax-got-abs.s
@@ -3,7 +3,7 @@
 ## Don't relax R_X86_64_GOTPCRELX to an absolute symbol.
 ## In -no-pie mode, it can be relaxed, but it may not worth it.
 
-# RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64 %s -o %t.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
 # RUN: ld.lld %t.o -o %t.so -shared
 # RUN: llvm-objdump --no-print-imm-hex -d %t.so | FileCheck %s
 
diff --git a/test/ELF/x86-64-relax-offset.s b/test/ELF/x86-64-relax-offset.s
index 3858e15..09f6b47 100644
--- a/test/ELF/x86-64-relax-offset.s
+++ b/test/ELF/x86-64-relax-offset.s
@@ -3,9 +3,8 @@
 /// Test we use input r_offset when deciding if R_X86_64_GOTPCRELX
 /// relaxation is applicable.
 
-// RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-pc-linux %s \
-// RUN:   -o %t.o
-// RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-pc-linux \
+// RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux \
 // RUN:   %p/Inputs/x86-64-relax-offset.s -o %t2.o
 // RUN: ld.lld %t2.o %t.o -o %t.so -shared
 // RUN: llvm-objdump --no-print-imm-hex -d %t.so | FileCheck %s