Reland "Change the X86 datalayout to add three address spaces
 for 32 bit signed, 32 bit unsigned, and 64 bit pointers."
This reverts 57076d3199fc2b0af4a3736b7749dd5462cacda5.

Original review at https://reviews.llvm.org/D64931.
Review for added fix at https://reviews.llvm.org/D66843.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@371568 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/COFF/Inputs/bar.ll b/test/COFF/Inputs/bar.ll
index 4aed5d2..4cb7fb0 100644
--- a/test/COFF/Inputs/bar.ll
+++ b/test/COFF/Inputs/bar.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @bar() {
diff --git a/test/COFF/Inputs/conflict.ll b/test/COFF/Inputs/conflict.ll
index 8cd7d70..0b2772a 100644
--- a/test/COFF/Inputs/conflict.ll
+++ b/test/COFF/Inputs/conflict.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @foo() {
diff --git a/test/COFF/Inputs/constant-export.ll b/test/COFF/Inputs/constant-export.ll
index 666c18f..f0fa136 100644
--- a/test/COFF/Inputs/constant-export.ll
+++ b/test/COFF/Inputs/constant-export.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
 target triple = "i686-unknown-windows-msvc18.0.0"
 
 @__CFConstantStringClassReference = common global [32 x i32] zeroinitializer, align 4
diff --git a/test/COFF/Inputs/entry-mangled.ll b/test/COFF/Inputs/entry-mangled.ll
index b6fac21..a4702d7 100644
--- a/test/COFF/Inputs/entry-mangled.ll
+++ b/test/COFF/Inputs/entry-mangled.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc18.0.0"
 
 define void @"\01?main@@YAHXZ"() {
diff --git a/test/COFF/Inputs/export.ll b/test/COFF/Inputs/export.ll
index d254683..96f99d7 100644
--- a/test/COFF/Inputs/export.ll
+++ b/test/COFF/Inputs/export.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @_DllMainCRTStartup() {
diff --git a/test/COFF/Inputs/libcall-archive.ll b/test/COFF/Inputs/libcall-archive.ll
index 3f8a24d..6ff9a6e 100644
--- a/test/COFF/Inputs/libcall-archive.ll
+++ b/test/COFF/Inputs/libcall-archive.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
 target triple = "i686-unknown-windows"
 
 define void @memcpy() {
diff --git a/test/COFF/Inputs/lto-cache.ll b/test/COFF/Inputs/lto-cache.ll
index acbee7b..f51bd56 100644
--- a/test/COFF/Inputs/lto-cache.ll
+++ b/test/COFF/Inputs/lto-cache.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define i32 @main() {
diff --git a/test/COFF/Inputs/lto-comdat1.ll b/test/COFF/Inputs/lto-comdat1.ll
index 7a9f50c..6e21481 100644
--- a/test/COFF/Inputs/lto-comdat1.ll
+++ b/test/COFF/Inputs/lto-comdat1.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 $comdat = comdat any
diff --git a/test/COFF/Inputs/lto-comdat2.ll b/test/COFF/Inputs/lto-comdat2.ll
index c2af2a4..a6a332d 100644
--- a/test/COFF/Inputs/lto-comdat2.ll
+++ b/test/COFF/Inputs/lto-comdat2.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 $comdat = comdat any
diff --git a/test/COFF/Inputs/lto-dep.ll b/test/COFF/Inputs/lto-dep.ll
index d6d47f2..71ae8c5 100644
--- a/test/COFF/Inputs/lto-dep.ll
+++ b/test/COFF/Inputs/lto-dep.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @foo() {
diff --git a/test/COFF/Inputs/lto-lazy-reference-dummy.ll b/test/COFF/Inputs/lto-lazy-reference-dummy.ll
index 0309f89..3c39f0f 100644
--- a/test/COFF/Inputs/lto-lazy-reference-dummy.ll
+++ b/test/COFF/Inputs/lto-lazy-reference-dummy.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
 target triple = "i686-pc-windows-msvc18.0.0"
 
 define void @dummy() {
diff --git a/test/COFF/Inputs/lto-lazy-reference-quadruple.ll b/test/COFF/Inputs/lto-lazy-reference-quadruple.ll
index 99c1d2b..cc2faf6 100644
--- a/test/COFF/Inputs/lto-lazy-reference-quadruple.ll
+++ b/test/COFF/Inputs/lto-lazy-reference-quadruple.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
 target triple = "i686-pc-windows-msvc18.0.0"
 
 define double @quadruple(double %x) {
diff --git a/test/COFF/Inputs/msvclto-order-a.ll b/test/COFF/Inputs/msvclto-order-a.ll
index 804e201..9f7633c 100644
--- a/test/COFF/Inputs/msvclto-order-a.ll
+++ b/test/COFF/Inputs/msvclto-order-a.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @foo() {
diff --git a/test/COFF/Inputs/msvclto-order-b.ll b/test/COFF/Inputs/msvclto-order-b.ll
index 57f2389..b4a3ce0 100644
--- a/test/COFF/Inputs/msvclto-order-b.ll
+++ b/test/COFF/Inputs/msvclto-order-b.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 declare void @doesntexist()
diff --git a/test/COFF/Inputs/thinlto-empty.ll b/test/COFF/Inputs/thinlto-empty.ll
index b3c546a..0b4067b 100644
--- a/test/COFF/Inputs/thinlto-empty.ll
+++ b/test/COFF/Inputs/thinlto-empty.ll
@@ -1,2 +1,2 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.0.24215"
diff --git a/test/COFF/Inputs/thinlto-mangled-qux.ll b/test/COFF/Inputs/thinlto-mangled-qux.ll
index 4c9cc8e..a9e8924 100644
--- a/test/COFF/Inputs/thinlto-mangled-qux.ll
+++ b/test/COFF/Inputs/thinlto-mangled-qux.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.0.24215"
 
 %class.baz = type { %class.bar }
diff --git a/test/COFF/Inputs/thinlto.ll b/test/COFF/Inputs/thinlto.ll
index 44ff9a0..e5e2a71 100644
--- a/test/COFF/Inputs/thinlto.ll
+++ b/test/COFF/Inputs/thinlto.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.0.24215"
 
 define void @g() {
diff --git a/test/COFF/Inputs/undefined-symbol-lto-a.ll b/test/COFF/Inputs/undefined-symbol-lto-a.ll
index 6793ec7..62632ec 100644
--- a/test/COFF/Inputs/undefined-symbol-lto-a.ll
+++ b/test/COFF/Inputs/undefined-symbol-lto-a.ll
@@ -1,6 +1,6 @@
 ; ModuleID = 't.obj'
 source_filename = "t.cpp"
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.21.27702"
 
 %struct.Init = type { %struct.S }
diff --git a/test/COFF/Inputs/undefined-symbol-lto-b.ll b/test/COFF/Inputs/undefined-symbol-lto-b.ll
index ff73e7c..a030094 100644
--- a/test/COFF/Inputs/undefined-symbol-lto-b.ll
+++ b/test/COFF/Inputs/undefined-symbol-lto-b.ll
@@ -1,6 +1,6 @@
 ; ModuleID = 'b.obj'
 source_filename = "b.cpp"
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.21.27702"
 
 %struct.S = type { i32 (...)** }
diff --git a/test/COFF/Inputs/weak-external.ll b/test/COFF/Inputs/weak-external.ll
index 4775d50..72f5901 100644
--- a/test/COFF/Inputs/weak-external.ll
+++ b/test/COFF/Inputs/weak-external.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @g() {
diff --git a/test/COFF/Inputs/weak-external2.ll b/test/COFF/Inputs/weak-external2.ll
index 2102c3b..378fda4 100644
--- a/test/COFF/Inputs/weak-external2.ll
+++ b/test/COFF/Inputs/weak-external2.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @f() {
diff --git a/test/COFF/Inputs/weak-external3.ll b/test/COFF/Inputs/weak-external3.ll
index f9a5136..d229e49 100644
--- a/test/COFF/Inputs/weak-external3.ll
+++ b/test/COFF/Inputs/weak-external3.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 @f = weak alias void(), void()* @g
diff --git a/test/COFF/entrylib.ll b/test/COFF/entrylib.ll
index 602b4ff..e9707a4 100644
--- a/test/COFF/entrylib.ll
+++ b/test/COFF/entrylib.ll
@@ -4,7 +4,7 @@
 ; RUN: llvm-ar cru %t.lib %t.obj
 ; RUN: lld-link /out:%t.exe /entry:main %t.lib
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define i32 @main() {
diff --git a/test/COFF/guardcf-lto.ll b/test/COFF/guardcf-lto.ll
index 6658b60..a7f4568 100644
--- a/test/COFF/guardcf-lto.ll
+++ b/test/COFF/guardcf-lto.ll
@@ -23,7 +23,7 @@
 ; CHECK-NEXT:   0x180{{.*}}
 ; CHECK-NEXT: ]
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.12.25835"
 
 declare dllimport void @do_indirect_call(void ()*)
diff --git a/test/COFF/include-lto.ll b/test/COFF/include-lto.ll
index d5ae546..c0cb8d1 100644
--- a/test/COFF/include-lto.ll
+++ b/test/COFF/include-lto.ll
@@ -7,7 +7,7 @@
 ; CHECK: xorl %eax, %eax
 ; CHECK-NEXT: retq
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @_DllMainCRTStartup() {
diff --git a/test/COFF/lib-module-asm.ll b/test/COFF/lib-module-asm.ll
index 0431af9..42c6797 100644
--- a/test/COFF/lib-module-asm.ll
+++ b/test/COFF/lib-module-asm.ll
@@ -5,7 +5,7 @@
 ; RUN: lld-link /lib /out:%t.lib %t.obj
 ; RUN: llvm-nm -M %t.lib | FileCheck %s
 
-target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
 target triple = "i386-pc-windows-msvc19.11.0"
 
 module asm ".global global_asm_sym"
diff --git a/test/COFF/libcall-archive.ll b/test/COFF/libcall-archive.ll
index 631503d..c78c1d4 100644
--- a/test/COFF/libcall-archive.ll
+++ b/test/COFF/libcall-archive.ll
@@ -10,7 +10,7 @@
 ; CHECK: _start
 ; CHECK: _memcpy
 
-target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
 target triple = "i686-unknown-windows"
 
 define void @start(i8* %a, i8* %b) {
diff --git a/test/COFF/loadcfg.ll b/test/COFF/loadcfg.ll
index 96b4b8e..46f6134 100644
--- a/test/COFF/loadcfg.ll
+++ b/test/COFF/loadcfg.ll
@@ -6,7 +6,7 @@
 ; CHECK: LoadConfigTableRVA: 0x2000
 ; CHECK: LoadConfigTableSize: 0x70
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 @_load_config_used = constant [28 x i32] [i32 112, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0]
diff --git a/test/COFF/lto-cache.ll b/test/COFF/lto-cache.ll
index 828f5e5..ced0c52 100644
--- a/test/COFF/lto-cache.ll
+++ b/test/COFF/lto-cache.ll
@@ -14,7 +14,7 @@
 ; Two cached objects, plus a timestamp file and "foo", minus the file we removed.
 ; RUN: ls %t.cache | count 4
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @globalfunc() #0 {
diff --git a/test/COFF/lto-chkstk.ll b/test/COFF/lto-chkstk.ll
index 1df93c6..c2a1518 100644
--- a/test/COFF/lto-chkstk.ll
+++ b/test/COFF/lto-chkstk.ll
@@ -6,7 +6,7 @@
 ; RUN: llvm-ar cru %t.lib %T/lto-chkstk-chkstk.obj
 ; RUN: lld-link /out:%t.exe /entry:main /subsystem:console %t.obj %T/lto-chkstk-foo.obj %t.lib
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @main() {
diff --git a/test/COFF/lto-comdat.ll b/test/COFF/lto-comdat.ll
index fbb7104..cf5a137 100644
--- a/test/COFF/lto-comdat.ll
+++ b/test/COFF/lto-comdat.ll
@@ -91,7 +91,7 @@
 ; TEXT-10: retq
 ; TEXT-10-NOT: {{.}}
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 $comdat = comdat any
diff --git a/test/COFF/lto-cpu-string.ll b/test/COFF/lto-cpu-string.ll
index 840adce..be52bfb 100644
--- a/test/COFF/lto-cpu-string.ll
+++ b/test/COFF/lto-cpu-string.ll
@@ -9,7 +9,7 @@
 ; RUN: llvm-objdump -d -section=".text" -no-leading-addr -no-show-raw-insn %t.znver1.dll | FileCheck -check-prefix=ZNVER1 %s
 ; ZNVER1: nopw
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.14.26433"
 
 define dllexport void @foo() #0 {
diff --git a/test/COFF/lto-debug-pass-arguments.ll b/test/COFF/lto-debug-pass-arguments.ll
index 4381590..6ecc864 100644
--- a/test/COFF/lto-debug-pass-arguments.ll
+++ b/test/COFF/lto-debug-pass-arguments.ll
@@ -2,7 +2,7 @@
 ; RUN: llvm-as %s -o %t.obj
 ; RUN: lld-link /dll /out:%t.dll %t.obj /mllvm:-debug-pass=Arguments 2>&1 | FileCheck %s
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define void @dummy() {
diff --git a/test/COFF/lto-icf.ll b/test/COFF/lto-icf.ll
index ef98d7b..0b0c26e 100644
--- a/test/COFF/lto-icf.ll
+++ b/test/COFF/lto-icf.ll
@@ -13,7 +13,7 @@
 ; CHECK:   RVA: 0x[[RVA]]
 ; CHECK-NOT: Export
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.12.25835"
 
 define dllexport i8* @icf_ptr() {
diff --git a/test/COFF/lto-lazy-reference.ll b/test/COFF/lto-lazy-reference.ll
index 428a7b8..a6f4010 100644
--- a/test/COFF/lto-lazy-reference.ll
+++ b/test/COFF/lto-lazy-reference.ll
@@ -6,7 +6,7 @@
 ; RUN: llvm-as -o %t.obj %s
 ; RUN: lld-link /out:%t.exe /entry:main /subsystem:console %t.obj %t.lib
 
-target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
 target triple = "i686-pc-windows-msvc18.0.0"
 
 ; Define fltused, since we don't link against the MS C runtime but are
diff --git a/test/COFF/lto-linker-opts.ll b/test/COFF/lto-linker-opts.ll
index 1fc4f5e..bbe67ae 100644
--- a/test/COFF/lto-linker-opts.ll
+++ b/test/COFF/lto-linker-opts.ll
@@ -2,7 +2,7 @@
 ; RUN: llvm-as -o %T/lto-linker-opts.obj %s
 ; RUN: env LIB=%S/Inputs lld-link /out:%T/lto-linker-opts.exe /entry:main /subsystem:console %T/lto-linker-opts.obj
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 !llvm.linker.options = !{!0}
diff --git a/test/COFF/lto-new-symbol.ll b/test/COFF/lto-new-symbol.ll
index dadd495..7f5a328 100644
--- a/test/COFF/lto-new-symbol.ll
+++ b/test/COFF/lto-new-symbol.ll
@@ -2,7 +2,7 @@
 ; RUN: llvm-as -o %t.obj %s
 ; RUN: lld-link /out:%t.exe /entry:foo /subsystem:console %t.obj
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 ; Define fltused, since we don't link against the MS C runtime but are
diff --git a/test/COFF/lto-obj-path.ll b/test/COFF/lto-obj-path.ll
index db61ba9..987e2bd 100644
--- a/test/COFF/lto-obj-path.ll
+++ b/test/COFF/lto-obj-path.ll
@@ -14,7 +14,7 @@
 ; CHECK: Format: COFF-x86-64
 ; SYMBOLS: @feat.00
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.0.24215"
 
 declare void @g(...)
diff --git a/test/COFF/lto-opt-level.ll b/test/COFF/lto-opt-level.ll
index 92f88ea..0e0e866 100644
--- a/test/COFF/lto-opt-level.ll
+++ b/test/COFF/lto-opt-level.ll
@@ -7,7 +7,7 @@
 ; RUN: lld-link /out:%t2a.exe /entry:main /subsystem:console /lldmap:%t2a.map %t.obj
 ; RUN: FileCheck --check-prefix=CHECK-O2 %s < %t2a.map
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 ; CHECK-O0: foo
diff --git a/test/COFF/lto-parallel.ll b/test/COFF/lto-parallel.ll
index 7a38a39..8e1f44a 100644
--- a/test/COFF/lto-parallel.ll
+++ b/test/COFF/lto-parallel.ll
@@ -3,7 +3,7 @@
 ; RUN: lld-link -opt:noicf /out:%t.exe /entry:foo /include:bar /opt:lldltopartitions=2 /subsystem:console /lldmap:%t.map %t.obj
 ; RUN: FileCheck %s < %t.map
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 ; CHECK: lto.tmp
diff --git a/test/COFF/lto-reloc-model.ll b/test/COFF/lto-reloc-model.ll
index 9ac32ae..2b7e3a8 100644
--- a/test/COFF/lto-reloc-model.ll
+++ b/test/COFF/lto-reloc-model.ll
@@ -3,7 +3,7 @@
 ; RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t
 ; RUN: llvm-objdump -d %t.exe | FileCheck %s
 
-target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
 target triple = "i686-pc-windows-msvc"
 
 @foo = thread_local global i8 0
diff --git a/test/COFF/lto.ll b/test/COFF/lto.ll
index 5462490..7c61f1c 100644
--- a/test/COFF/lto.ll
+++ b/test/COFF/lto.ll
@@ -123,7 +123,7 @@
 ; TEXT-10-NEXT: addq	$40, %rsp
 ; TEXT-10-NEXT: retq
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define i32 @main() {
diff --git a/test/COFF/savetemps.ll b/test/COFF/savetemps.ll
index 7f2e11c..e755ba9 100644
--- a/test/COFF/savetemps.ll
+++ b/test/COFF/savetemps.ll
@@ -21,7 +21,7 @@
 ; CHECK: define i32 @main()
 ; CHECK-OBJDUMP: file format COFF
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define i32 @main() {
diff --git a/test/COFF/thinlto-archivecollision.ll b/test/COFF/thinlto-archivecollision.ll
index 8b8865d..b865402 100644
--- a/test/COFF/thinlto-archivecollision.ll
+++ b/test/COFF/thinlto-archivecollision.ll
@@ -16,7 +16,7 @@
 ; CHECK-NEXT: {{/|\\\\thinlto-archivecollision.ll.tmp/libbar.libbar.obj[0-9]+$}}
 ; CHECK-NEXT: {{^-r=.*/|\\\\thinlto-archivecollision.ll.tmp/libbar.libbar.obj[0-9]+,bar,p$}}
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 declare void @bar()
diff --git a/test/COFF/thinlto-archives.ll b/test/COFF/thinlto-archives.ll
index a3de6c9..9194db8 100644
--- a/test/COFF/thinlto-archives.ll
+++ b/test/COFF/thinlto-archives.ll
@@ -18,7 +18,7 @@
 ; CHECK-NEXT: {{/thinlto-archives/b.libbar.obj[0-9]+$}}
 ; CHECK-NEXT: {{^-r=.*/thinlto-archives/b.libbar.obj[0-9]+,bar,p$}}
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 declare void @bar()
diff --git a/test/COFF/thinlto-emit-imports.ll b/test/COFF/thinlto-emit-imports.ll
index b2ecd46..9ffe3b2 100644
--- a/test/COFF/thinlto-emit-imports.ll
+++ b/test/COFF/thinlto-emit-imports.ll
@@ -47,7 +47,7 @@
 ; RUN: not ls %t2.obj.imports
 ; RUN: not ls %t3.obj.imports
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.0.24215"
 
 declare void @g(...)
diff --git a/test/COFF/thinlto-index-only.ll b/test/COFF/thinlto-index-only.ll
index f1f2412..db41309 100644
--- a/test/COFF/thinlto-index-only.ll
+++ b/test/COFF/thinlto-index-only.ll
@@ -41,7 +41,7 @@
 ; BACKEND2-NEXT: <COMBINED
 ; BACKEND2-NEXT: </GLOBALVAL_SUMMARY_BLOCK
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.0.24215"
 
 declare void @g(...)
diff --git a/test/COFF/thinlto-mangled.ll b/test/COFF/thinlto-mangled.ll
index 8c901cb..e4a513d 100644
--- a/test/COFF/thinlto-mangled.ll
+++ b/test/COFF/thinlto-mangled.ll
@@ -3,7 +3,7 @@
 ; RUN: opt -thinlto-bc %S/Inputs/thinlto-mangled-qux.ll -o %T/thinlto-mangled-qux.obj
 ; RUN: lld-link -out:%t.exe -entry:main %t.obj %T/thinlto-mangled-qux.obj
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.0.24215"
 
 %"class.bar" = type { i32 (...)**, i8*, i8*, i8*, i32 }
diff --git a/test/COFF/thinlto-object-suffix-replace.ll b/test/COFF/thinlto-object-suffix-replace.ll
index eea898d..4c9f2c8 100644
--- a/test/COFF/thinlto-object-suffix-replace.ll
+++ b/test/COFF/thinlto-object-suffix-replace.ll
@@ -36,7 +36,7 @@
 ; RUN: -thinlto-object-suffix-replace:".abc;.obj" %t1.thinlink.bc -out:%t3.exe
 ; RUN: ls %t1.thinlink.bc.thinlto.bc
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.0.24215"
 
 define void @main() {
diff --git a/test/COFF/thinlto-prefix-replace.ll b/test/COFF/thinlto-prefix-replace.ll
index a6a116d..ed8713f 100644
--- a/test/COFF/thinlto-prefix-replace.ll
+++ b/test/COFF/thinlto-prefix-replace.ll
@@ -18,7 +18,7 @@
 ; RUN:     -out:%t/t.exe 2>&1 | FileCheck --check-prefix=ERR %s
 ; ERR: -thinlto-prefix-replace: expects 'old;new' format, but got abc:def
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc19.0.24215"
 
 define void @main() {
diff --git a/test/COFF/thinlto.ll b/test/COFF/thinlto.ll
index 77ba9b9..f24f362 100644
--- a/test/COFF/thinlto.ll
+++ b/test/COFF/thinlto.ll
@@ -8,7 +8,7 @@
 
 ; CHECK-NOT: U foo
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define i32 @main() {
diff --git a/test/COFF/unresolved-lto-bitcode.ll b/test/COFF/unresolved-lto-bitcode.ll
index 6147dd1..5ace81b 100644
--- a/test/COFF/unresolved-lto-bitcode.ll
+++ b/test/COFF/unresolved-lto-bitcode.ll
@@ -17,7 +17,7 @@
 ; FILE: foo.obj
 ; FILE: main.obj
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define i32 @main() {
diff --git a/test/COFF/unresolved-lto.ll b/test/COFF/unresolved-lto.ll
index e3071cc..a1e5229 100644
--- a/test/COFF/unresolved-lto.ll
+++ b/test/COFF/unresolved-lto.ll
@@ -16,7 +16,7 @@
 ; FILE: foo.obj
 ; FILE: main.obj
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 define i32 @main() {
diff --git a/test/COFF/used-lto.ll b/test/COFF/used-lto.ll
index c269fba..d1c87c1 100644
--- a/test/COFF/used-lto.ll
+++ b/test/COFF/used-lto.ll
@@ -5,7 +5,7 @@
 
 ; CHECK: S_PUB32 {{.*}} `foo`
 
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc"
 
 @llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
diff --git a/test/ELF/lto/Inputs/archive-2.ll b/test/ELF/lto/Inputs/archive-2.ll
index 8236cfe..648dccb 100644
--- a/test/ELF/lto/Inputs/archive-2.ll
+++ b/test/ELF/lto/Inputs/archive-2.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @_start() {
diff --git a/test/ELF/lto/Inputs/archive-3.ll b/test/ELF/lto/Inputs/archive-3.ll
index 3744246..af86e09 100644
--- a/test/ELF/lto/Inputs/archive-3.ll
+++ b/test/ELF/lto/Inputs/archive-3.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @foo() {
diff --git a/test/ELF/lto/Inputs/archive.ll b/test/ELF/lto/Inputs/archive.ll
index 71c1e4f..478f6ee 100644
--- a/test/ELF/lto/Inputs/archive.ll
+++ b/test/ELF/lto/Inputs/archive.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @f() {
diff --git a/test/ELF/lto/Inputs/asmundef.ll b/test/ELF/lto/Inputs/asmundef.ll
index 0992f79..4197faf 100644
--- a/test/ELF/lto/Inputs/asmundef.ll
+++ b/test/ELF/lto/Inputs/asmundef.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @patatino()
diff --git a/test/ELF/lto/Inputs/available-externally.ll b/test/ELF/lto/Inputs/available-externally.ll
index b8583ea..ec45900 100644
--- a/test/ELF/lto/Inputs/available-externally.ll
+++ b/test/ELF/lto/Inputs/available-externally.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @zed() {
diff --git a/test/ELF/lto/Inputs/cache.ll b/test/ELF/lto/Inputs/cache.ll
index 0928902..1b827cd 100644
--- a/test/ELF/lto/Inputs/cache.ll
+++ b/test/ELF/lto/Inputs/cache.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define i32 @_start() {
diff --git a/test/ELF/lto/Inputs/common3.ll b/test/ELF/lto/Inputs/common3.ll
index 8f20a1e..bbd6c34 100644
--- a/test/ELF/lto/Inputs/common3.ll
+++ b/test/ELF/lto/Inputs/common3.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @a = common hidden global i64 0, align 4
diff --git a/test/ELF/lto/Inputs/data-ordering-lto.ll b/test/ELF/lto/Inputs/data-ordering-lto.ll
index a95fa6d..8e87276 100644
--- a/test/ELF/lto/Inputs/data-ordering-lto.ll
+++ b/test/ELF/lto/Inputs/data-ordering-lto.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-scei-ps4"
 
 @pat = global i32 33, align 4
diff --git a/test/ELF/lto/Inputs/defsym-bar.ll b/test/ELF/lto/Inputs/defsym-bar.ll
index 748c7b2..840fecd 100644
--- a/test/ELF/lto/Inputs/defsym-bar.ll
+++ b/test/ELF/lto/Inputs/defsym-bar.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @this_is_bar1()
diff --git a/test/ELF/lto/Inputs/drop-linkage.ll b/test/ELF/lto/Inputs/drop-linkage.ll
index 0e3dc7a..d860557 100644
--- a/test/ELF/lto/Inputs/drop-linkage.ll
+++ b/test/ELF/lto/Inputs/drop-linkage.ll
@@ -1,5 +1,5 @@
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 $foo = comdat any
 define linkonce void @foo() comdat {
diff --git a/test/ELF/lto/Inputs/duplicated-name.ll b/test/ELF/lto/Inputs/duplicated-name.ll
index 78678c0..86c410e 100644
--- a/test/ELF/lto/Inputs/duplicated-name.ll
+++ b/test/ELF/lto/Inputs/duplicated-name.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @f2() {
diff --git a/test/ELF/lto/Inputs/i386-empty.ll b/test/ELF/lto/Inputs/i386-empty.ll
index 6029cb6..6ff84a7 100644
--- a/test/ELF/lto/Inputs/i386-empty.ll
+++ b/test/ELF/lto/Inputs/i386-empty.ll
@@ -1,2 +1,2 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "i686-linux-gnu"
diff --git a/test/ELF/lto/Inputs/internalize-exportdyn.ll b/test/ELF/lto/Inputs/internalize-exportdyn.ll
index 21ac358..585b99a 100644
--- a/test/ELF/lto/Inputs/internalize-exportdyn.ll
+++ b/test/ELF/lto/Inputs/internalize-exportdyn.ll
@@ -1,5 +1,5 @@
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define weak_odr void @bah() {
   ret void
diff --git a/test/ELF/lto/Inputs/internalize-undef.ll b/test/ELF/lto/Inputs/internalize-undef.ll
index 71c1e4f..478f6ee 100644
--- a/test/ELF/lto/Inputs/internalize-undef.ll
+++ b/test/ELF/lto/Inputs/internalize-undef.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @f() {
diff --git a/test/ELF/lto/Inputs/irmover-error.ll b/test/ELF/lto/Inputs/irmover-error.ll
index 86ed259..de2e9f0 100644
--- a/test/ELF/lto/Inputs/irmover-error.ll
+++ b/test/ELF/lto/Inputs/irmover-error.ll
@@ -1,5 +1,5 @@
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 !0 = !{ i32 1, !"foo", i32 2 }
 
diff --git a/test/ELF/lto/Inputs/irmover-warning.ll b/test/ELF/lto/Inputs/irmover-warning.ll
index 72d437f..2948654 100644
--- a/test/ELF/lto/Inputs/irmover-warning.ll
+++ b/test/ELF/lto/Inputs/irmover-warning.ll
@@ -1,5 +1,5 @@
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @f() {
   ret void
diff --git a/test/ELF/lto/Inputs/lazy-internal.ll b/test/ELF/lto/Inputs/lazy-internal.ll
index 918791c..3b79ff6 100644
--- a/test/ELF/lto/Inputs/lazy-internal.ll
+++ b/test/ELF/lto/Inputs/lazy-internal.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define hidden void @bar() {
diff --git a/test/ELF/lto/Inputs/libcall-archive.ll b/test/ELF/lto/Inputs/libcall-archive.ll
index 4e6421c..11eaefc 100644
--- a/test/ELF/lto/Inputs/libcall-archive.ll
+++ b/test/ELF/lto/Inputs/libcall-archive.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @memcpy() {
diff --git a/test/ELF/lto/Inputs/linker-script-symbols-ipo.ll b/test/ELF/lto/Inputs/linker-script-symbols-ipo.ll
index c872f9e..3031557 100644
--- a/test/ELF/lto/Inputs/linker-script-symbols-ipo.ll
+++ b/test/ELF/lto/Inputs/linker-script-symbols-ipo.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare i32 @bar()
diff --git a/test/ELF/lto/Inputs/linkonce-odr.ll b/test/ELF/lto/Inputs/linkonce-odr.ll
index 0b38288..b465a4b 100644
--- a/test/ELF/lto/Inputs/linkonce-odr.ll
+++ b/test/ELF/lto/Inputs/linkonce-odr.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define linkonce_odr void @f() {
diff --git a/test/ELF/lto/Inputs/linkonce.ll b/test/ELF/lto/Inputs/linkonce.ll
index a6738b3..cb6f99a 100644
--- a/test/ELF/lto/Inputs/linkonce.ll
+++ b/test/ELF/lto/Inputs/linkonce.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define linkonce void @f() {
diff --git a/test/ELF/lto/Inputs/obj-path.ll b/test/ELF/lto/Inputs/obj-path.ll
index 31c72ec..7cf01bc 100644
--- a/test/ELF/lto/Inputs/obj-path.ll
+++ b/test/ELF/lto/Inputs/obj-path.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @g() {
diff --git a/test/ELF/lto/Inputs/relocation-model-pic.ll b/test/ELF/lto/Inputs/relocation-model-pic.ll
index e766054..d5c69a5 100644
--- a/test/ELF/lto/Inputs/relocation-model-pic.ll
+++ b/test/ELF/lto/Inputs/relocation-model-pic.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @foo = external global i32
diff --git a/test/ELF/lto/Inputs/save-temps.ll b/test/ELF/lto/Inputs/save-temps.ll
index d6e6eb6..67cdbaf 100644
--- a/test/ELF/lto/Inputs/save-temps.ll
+++ b/test/ELF/lto/Inputs/save-temps.ll
@@ -1,5 +1,5 @@
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @bar() {
   ret void
diff --git a/test/ELF/lto/Inputs/start-lib1.ll b/test/ELF/lto/Inputs/start-lib1.ll
index 9f42e6a..8e09f4a 100644
--- a/test/ELF/lto/Inputs/start-lib1.ll
+++ b/test/ELF/lto/Inputs/start-lib1.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @bar()
diff --git a/test/ELF/lto/Inputs/start-lib2.ll b/test/ELF/lto/Inputs/start-lib2.ll
index 68b3c83..7986919 100644
--- a/test/ELF/lto/Inputs/start-lib2.ll
+++ b/test/ELF/lto/Inputs/start-lib2.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @bar() {
diff --git a/test/ELF/lto/Inputs/symbol-ordering-lto.ll b/test/ELF/lto/Inputs/symbol-ordering-lto.ll
index 164659c..9bb2c7d 100644
--- a/test/ELF/lto/Inputs/symbol-ordering-lto.ll
+++ b/test/ELF/lto/Inputs/symbol-ordering-lto.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-scei-ps4"
 
 define i32 @tin() {
diff --git a/test/ELF/lto/Inputs/thin1.ll b/test/ELF/lto/Inputs/thin1.ll
index 9302983..011eee6 100644
--- a/test/ELF/lto/Inputs/thin1.ll
+++ b/test/ELF/lto/Inputs/thin1.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-scei-ps4"
 
 define i32 @foo(i32 %goo) {
diff --git a/test/ELF/lto/Inputs/thin2.ll b/test/ELF/lto/Inputs/thin2.ll
index 6cffbdc..7c3e61e 100644
--- a/test/ELF/lto/Inputs/thin2.ll
+++ b/test/ELF/lto/Inputs/thin2.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-scei-ps4"
 
 define i32 @blah(i32 %meh) #0 {
diff --git a/test/ELF/lto/Inputs/thinlto.ll b/test/ELF/lto/Inputs/thinlto.ll
index 31c72ec..7cf01bc 100644
--- a/test/ELF/lto/Inputs/thinlto.ll
+++ b/test/ELF/lto/Inputs/thinlto.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @g() {
diff --git a/test/ELF/lto/Inputs/thinlto_empty.ll b/test/ELF/lto/Inputs/thinlto_empty.ll
index a3c99cd..a4e3140 100644
--- a/test/ELF/lto/Inputs/thinlto_empty.ll
+++ b/test/ELF/lto/Inputs/thinlto_empty.ll
@@ -1,2 +1,2 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
diff --git a/test/ELF/lto/Inputs/type-merge.ll b/test/ELF/lto/Inputs/type-merge.ll
index c316421..aceacd4 100644
--- a/test/ELF/lto/Inputs/type-merge.ll
+++ b/test/ELF/lto/Inputs/type-merge.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @zed() {
diff --git a/test/ELF/lto/Inputs/type-merge2.ll b/test/ELF/lto/Inputs/type-merge2.ll
index 79fd1f8..de92d2c 100644
--- a/test/ELF/lto/Inputs/type-merge2.ll
+++ b/test/ELF/lto/Inputs/type-merge2.ll
@@ -1,5 +1,5 @@
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 %zed = type { i16 }
 define void @bar(%zed* %this)  {
diff --git a/test/ELF/lto/Inputs/unnamed-addr-drop.ll b/test/ELF/lto/Inputs/unnamed-addr-drop.ll
index b91bc8e..fa16353 100644
--- a/test/ELF/lto/Inputs/unnamed-addr-drop.ll
+++ b/test/ELF/lto/Inputs/unnamed-addr-drop.ll
@@ -1,4 +1,4 @@
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 @foo = unnamed_addr constant i32 42
diff --git a/test/ELF/lto/Inputs/weakodr-visibility.ll b/test/ELF/lto/Inputs/weakodr-visibility.ll
index 1bd9560..00c68fe 100644
--- a/test/ELF/lto/Inputs/weakodr-visibility.ll
+++ b/test/ELF/lto/Inputs/weakodr-visibility.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define weak_odr protected i32 @foo(i8* %this) {
diff --git a/test/ELF/lto/Inputs/wrap-bar.ll b/test/ELF/lto/Inputs/wrap-bar.ll
index 407ebfb..7a4f2e0 100644
--- a/test/ELF/lto/Inputs/wrap-bar.ll
+++ b/test/ELF/lto/Inputs/wrap-bar.ll
@@ -1,4 +1,4 @@
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define hidden void @bar() {
diff --git a/test/ELF/lto/abs-resol.ll b/test/ELF/lto/abs-resol.ll
index 4b0fb47..01de6ad 100644
--- a/test/ELF/lto/abs-resol.ll
+++ b/test/ELF/lto/abs-resol.ll
@@ -7,7 +7,7 @@
 ; RUN: echo "blah = 0xdeadfeef;" > %t.script
 ; RUN: ld.lld %t.o -T%t.script -o %t4.out -pie
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @blah = external global i8, align 1
diff --git a/test/ELF/lto/archive-2.ll b/test/ELF/lto/archive-2.ll
index 40d1aba..7235059 100644
--- a/test/ELF/lto/archive-2.ll
+++ b/test/ELF/lto/archive-2.ll
@@ -16,7 +16,7 @@
 ; CHECK-NEXT: Other: 0
 ; CHECK-NEXT: Section: .text
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @g() {
diff --git a/test/ELF/lto/archive-3.ll b/test/ELF/lto/archive-3.ll
index fec1b61..a5270b8 100644
--- a/test/ELF/lto/archive-3.ll
+++ b/test/ELF/lto/archive-3.ll
@@ -12,7 +12,7 @@
 
 ; CHECK: define internal void @foo() {
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 define void @_start() {
   ret void
diff --git a/test/ELF/lto/archive-no-index.ll b/test/ELF/lto/archive-no-index.ll
index f7a2cf8..79052db 100644
--- a/test/ELF/lto/archive-no-index.ll
+++ b/test/ELF/lto/archive-no-index.ll
@@ -12,7 +12,7 @@
 ; RUN: ld.lld -o %t -emain %t1.o %t1.a
 ; RUN: ld.lld -o %t -emain %t1.o %t2.a
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @f()
diff --git a/test/ELF/lto/archive.ll b/test/ELF/lto/archive.ll
index 655c48e..e6a4284 100644
--- a/test/ELF/lto/archive.ll
+++ b/test/ELF/lto/archive.ll
@@ -24,7 +24,7 @@
 ; CHECK-NEXT: Other: 0
 ; CHECK-NEXT: Section: .text
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @g() {
diff --git a/test/ELF/lto/asmundef.ll b/test/ELF/lto/asmundef.ll
index 604af8f..697fddf 100644
--- a/test/ELF/lto/asmundef.ll
+++ b/test/ELF/lto/asmundef.ll
@@ -4,7 +4,7 @@
 ; RUN: ld.lld %t.o %t2.o -o %t -save-temps
 ; RUN: llvm-dis %t.0.4.opt.bc -o - | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 module asm ".weak patatino"
diff --git a/test/ELF/lto/available-externally.ll b/test/ELF/lto/available-externally.ll
index 516bec8..b06971d 100644
--- a/test/ELF/lto/available-externally.ll
+++ b/test/ELF/lto/available-externally.ll
@@ -4,7 +4,7 @@
 ; RUN: ld.lld %t1.o %t2.o -o %t.so -shared -save-temps
 ; RUN: llvm-dis < %t.so.0.2.internalize.bc | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @foo() {
diff --git a/test/ELF/lto/cache.ll b/test/ELF/lto/cache.ll
index fe12398..c17dee0 100644
--- a/test/ELF/lto/cache.ll
+++ b/test/ELF/lto/cache.ll
@@ -51,7 +51,7 @@
 ; CHECK: llvmcache-newer
 ; CHECK-NOT: llvmcache-old
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @globalfunc() #0 {
diff --git a/test/ELF/lto/codemodel.ll b/test/ELF/lto/codemodel.ll
index 995575a..15d32ca 100644
--- a/test/ELF/lto/codemodel.ll
+++ b/test/ELF/lto/codemodel.ll
@@ -6,7 +6,7 @@
 ; RUN: llvm-objdump -d %tl | FileCheck %s --check-prefix=CHECK-LARGE
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 @data = internal constant [0 x i32] []
 
diff --git a/test/ELF/lto/combined-lto-object-name.ll b/test/ELF/lto/combined-lto-object-name.ll
index e0b9874..6f2d30d 100644
--- a/test/ELF/lto/combined-lto-object-name.ll
+++ b/test/ELF/lto/combined-lto-object-name.ll
@@ -3,7 +3,7 @@
 ; RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 declare void @foo()
 define void @_start() {
diff --git a/test/ELF/lto/comdat.ll b/test/ELF/lto/comdat.ll
index d61058f..9895e08 100644
--- a/test/ELF/lto/comdat.ll
+++ b/test/ELF/lto/comdat.ll
@@ -12,7 +12,7 @@
 ; CHECK-NEXT: Section: .text
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 $foo = comdat any
 define void @foo() comdat {
diff --git a/test/ELF/lto/comdat2.ll b/test/ELF/lto/comdat2.ll
index 8cd4559..ecfdc75 100644
--- a/test/ELF/lto/comdat2.ll
+++ b/test/ELF/lto/comdat2.ll
@@ -11,7 +11,7 @@
 ; RUN: llvm-readobj --symbols %t2.so | FileCheck %s --check-prefix=OTHER
 
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 $c = comdat any
diff --git a/test/ELF/lto/common.ll b/test/ELF/lto/common.ll
index 82f00bc..e76ca7f 100644
--- a/test/ELF/lto/common.ll
+++ b/test/ELF/lto/common.ll
@@ -25,7 +25,7 @@
 ; CHECK-NEXT: Other: 0
 ; CHECK-NEXT: Section: .bss
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @a = common global i32 0, align 8
diff --git a/test/ELF/lto/common2.ll b/test/ELF/lto/common2.ll
index a7463cb..1e886b8 100644
--- a/test/ELF/lto/common2.ll
+++ b/test/ELF/lto/common2.ll
@@ -4,7 +4,7 @@
 ; RUN: llvm-dis < %t.0.2.internalize.bc | FileCheck %s
 ; RUN: llvm-readobj --symbols %t | FileCheck %s --check-prefix=SHARED
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @a = common global i8 0, align 8
diff --git a/test/ELF/lto/common3.ll b/test/ELF/lto/common3.ll
index de52615..66cf918 100644
--- a/test/ELF/lto/common3.ll
+++ b/test/ELF/lto/common3.ll
@@ -4,7 +4,7 @@
 ; RUN: ld.lld %t1.o %t2.o -o %t -shared -save-temps
 ; RUN: llvm-dis < %t.0.2.internalize.bc | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 @a = common hidden global i32 0, align 8
 define i32 @f() {
diff --git a/test/ELF/lto/common4.ll b/test/ELF/lto/common4.ll
index 1d2f2d9..7a40e4b 100644
--- a/test/ELF/lto/common4.ll
+++ b/test/ELF/lto/common4.ll
@@ -14,7 +14,7 @@
 ; RUN: ld.lld -pie -o %t.exe -save-temps %t.o
 ; RUN: llvm-dis < %t.exe.0.2.internalize.bc | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @a = common dso_local local_unnamed_addr global i32 0, align 4
diff --git a/test/ELF/lto/cpu-string.ll b/test/ELF/lto/cpu-string.ll
index ff80dbb..df88101 100644
--- a/test/ELF/lto/cpu-string.ll
+++ b/test/ELF/lto/cpu-string.ll
@@ -13,7 +13,7 @@
 ; RUN: ld.lld -plugin-opt=mcpu=znver1 %t.o -o %t.znver1.so -shared
 ; RUN: llvm-objdump -d -section=".text" -no-leading-addr -no-show-raw-insn %t.znver1.so | FileCheck -check-prefix=ZNVER1 %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @foo() #0 {
diff --git a/test/ELF/lto/ctors.ll b/test/ELF/lto/ctors.ll
index a17e5b7..0d14725 100644
--- a/test/ELF/lto/ctors.ll
+++ b/test/ELF/lto/ctors.ll
@@ -3,7 +3,7 @@
 ; RUN: ld.lld %t.o -o %t.so -shared
 ; RUN: llvm-readobj --sections %t.so | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ctor, i8* null }]
diff --git a/test/ELF/lto/debugger-tune.ll b/test/ELF/lto/debugger-tune.ll
index b745775..193bc63 100644
--- a/test/ELF/lto/debugger-tune.ll
+++ b/test/ELF/lto/debugger-tune.ll
@@ -13,7 +13,7 @@
 ; RUN: llvm-dwarfdump %t.exe | FileCheck --check-prefix=SCE %s
 ; SCE-NOT: name_of_foo
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @foo = global i32 0, align 4, !dbg !0
diff --git a/test/ELF/lto/defsym.ll b/test/ELF/lto/defsym.ll
index 1073ab8..1c5c743 100644
--- a/test/ELF/lto/defsym.ll
+++ b/test/ELF/lto/defsym.ll
@@ -25,7 +25,7 @@
 ; CHECK-NEXT: popq %rax
 ; CHECK-NEXT: jmp
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @bar1()
diff --git a/test/ELF/lto/discard-value-names.ll b/test/ELF/lto/discard-value-names.ll
index 485014e..d3f10dd 100644
--- a/test/ELF/lto/discard-value-names.ll
+++ b/test/ELF/lto/discard-value-names.ll
@@ -11,7 +11,7 @@
 ; CHECK:  %add = add i32 %in, %GV
 ; CHECK:  ret i32 %add
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @GlobalValueName = global i32 0
diff --git a/test/ELF/lto/drop-linkage.ll b/test/ELF/lto/drop-linkage.ll
index f02fa02..de30591 100644
--- a/test/ELF/lto/drop-linkage.ll
+++ b/test/ELF/lto/drop-linkage.ll
@@ -5,7 +5,7 @@
 ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @foo() {
   ret void
diff --git a/test/ELF/lto/duplicated-name.ll b/test/ELF/lto/duplicated-name.ll
index b9e6c54..0a6dce5 100644
--- a/test/ELF/lto/duplicated-name.ll
+++ b/test/ELF/lto/duplicated-name.ll
@@ -7,7 +7,7 @@
 ; RUN: llvm-ar rcS %t2.a %t.o
 ; RUN: ld.lld -m elf_x86_64 -shared -o %t.so -uf1 -uf2 %t1.a %t2.a
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @f1() {
diff --git a/test/ELF/lto/duplicated.ll b/test/ELF/lto/duplicated.ll
index fc60fba..f278c45 100644
--- a/test/ELF/lto/duplicated.ll
+++ b/test/ELF/lto/duplicated.ll
@@ -7,7 +7,7 @@
 ; CHECK-NEXT: >>> defined in {{.*}}.o
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @f() {
   ret void
diff --git a/test/ELF/lto/dynamic-list.ll b/test/ELF/lto/dynamic-list.ll
index 5504ad0..043b35a 100644
--- a/test/ELF/lto/dynamic-list.ll
+++ b/test/ELF/lto/dynamic-list.ll
@@ -17,7 +17,7 @@
 ; CHECK-NEXT: }
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @_start() {
   ret void
diff --git a/test/ELF/lto/dynsym.ll b/test/ELF/lto/dynsym.ll
index 392ac56..7eab9e4 100644
--- a/test/ELF/lto/dynsym.ll
+++ b/test/ELF/lto/dynsym.ll
@@ -10,7 +10,7 @@
 ; RUN:   -o %t
 ; RUN: llvm-readobj --dyn-syms %t | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @_start() {
diff --git a/test/ELF/lto/emit-llvm.ll b/test/ELF/lto/emit-llvm.ll
index bf38c98..a2020b4 100644
--- a/test/ELF/lto/emit-llvm.ll
+++ b/test/ELF/lto/emit-llvm.ll
@@ -6,7 +6,7 @@
 
 ; CHECK: define internal void @main()
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @main() {
diff --git a/test/ELF/lto/inline-asm.ll b/test/ELF/lto/inline-asm.ll
index e0732e6..1f543bc 100644
--- a/test/ELF/lto/inline-asm.ll
+++ b/test/ELF/lto/inline-asm.ll
@@ -2,7 +2,7 @@
 ; RUN: llvm-as %s -o %t.o
 ; RUN: ld.lld %t.o -o %t.so -shared
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @foo() {
diff --git a/test/ELF/lto/internalize-basic.ll b/test/ELF/lto/internalize-basic.ll
index 5197654..704ea01 100644
--- a/test/ELF/lto/internalize-basic.ll
+++ b/test/ELF/lto/internalize-basic.ll
@@ -4,7 +4,7 @@
 ; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @_start() {
   ret void
diff --git a/test/ELF/lto/internalize-exportdyn.ll b/test/ELF/lto/internalize-exportdyn.ll
index 7c996e1..5e0ec78 100644
--- a/test/ELF/lto/internalize-exportdyn.ll
+++ b/test/ELF/lto/internalize-exportdyn.ll
@@ -5,7 +5,7 @@
 ; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @_start() {
   ret void
diff --git a/test/ELF/lto/internalize-llvmused.ll b/test/ELF/lto/internalize-llvmused.ll
index 7e3d867..064a8c8 100644
--- a/test/ELF/lto/internalize-llvmused.ll
+++ b/test/ELF/lto/internalize-llvmused.ll
@@ -4,7 +4,7 @@
 ; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @_start() {
   ret void
diff --git a/test/ELF/lto/internalize-undef.ll b/test/ELF/lto/internalize-undef.ll
index c0860d8..1133f1d 100644
--- a/test/ELF/lto/internalize-undef.ll
+++ b/test/ELF/lto/internalize-undef.ll
@@ -4,7 +4,7 @@
 ; RUN: ld.lld %t.o %t2.o -o %t -save-temps
 ; RUN: llvm-dis < %t.0.2.internalize.bc | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @f()
diff --git a/test/ELF/lto/internalize-version-script.ll b/test/ELF/lto/internalize-version-script.ll
index 7e242e1..8ab62c8 100644
--- a/test/ELF/lto/internalize-version-script.ll
+++ b/test/ELF/lto/internalize-version-script.ll
@@ -5,7 +5,7 @@
 ; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @foo() {
   ret void
diff --git a/test/ELF/lto/irmover-error.ll b/test/ELF/lto/irmover-error.ll
index d1c962f..6e1a61d 100644
--- a/test/ELF/lto/irmover-error.ll
+++ b/test/ELF/lto/irmover-error.ll
@@ -5,7 +5,7 @@
 ; CHECK: linking module flags 'foo': IDs have conflicting values
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 !0 = !{ i32 1, !"foo", i32 1 }
 
diff --git a/test/ELF/lto/irmover-warning.ll b/test/ELF/lto/irmover-warning.ll
index 7b0db78..5896ed6 100644
--- a/test/ELF/lto/irmover-warning.ll
+++ b/test/ELF/lto/irmover-warning.ll
@@ -9,7 +9,7 @@
 ; CHECK-SAME: irmover-warning.ll.tmp.a(irmover-warning.ll.tmp2.bc at {{[0-9]+}})
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 declare void @f()
 
diff --git a/test/ELF/lto/keep-undefined.ll b/test/ELF/lto/keep-undefined.ll
index 55d2a05..4e26512 100644
--- a/test/ELF/lto/keep-undefined.ll
+++ b/test/ELF/lto/keep-undefined.ll
@@ -8,7 +8,7 @@
 ; CHECK: T foo
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @foo() {
   ret void
diff --git a/test/ELF/lto/lazy-internal.ll b/test/ELF/lto/lazy-internal.ll
index 1bb2bac..dc1ba45 100644
--- a/test/ELF/lto/lazy-internal.ll
+++ b/test/ELF/lto/lazy-internal.ll
@@ -9,7 +9,7 @@
 ; CHECK: define internal void @foo()
 ; CHECK: define internal void @bar()
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define hidden void @foo() {
diff --git a/test/ELF/lto/libcall-archive.ll b/test/ELF/lto/libcall-archive.ll
index 7e8ac18..28c65fe 100644
--- a/test/ELF/lto/libcall-archive.ll
+++ b/test/ELF/lto/libcall-archive.ll
@@ -13,7 +13,7 @@
 ; CHECK: T _start
 ; CHECK: T memcpy
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @_start(i8* %a, i8* %b) {
diff --git a/test/ELF/lto/linkage.ll b/test/ELF/lto/linkage.ll
index 9b93900..89a8339 100644
--- a/test/ELF/lto/linkage.ll
+++ b/test/ELF/lto/linkage.ll
@@ -3,7 +3,7 @@
 ; RUN: ld.lld %t1.o %t1.o -o %t.so -shared
 ; RUN: llvm-nm %t.so | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 ; Should not encounter a duplicate symbol error for @.str
diff --git a/test/ELF/lto/linker-script-symbols-assign.ll b/test/ELF/lto/linker-script-symbols-assign.ll
index 30a69f8..e5e2675 100644
--- a/test/ELF/lto/linker-script-symbols-assign.ll
+++ b/test/ELF/lto/linker-script-symbols-assign.ll
@@ -33,7 +33,7 @@
 ; ABS-NEXT: }
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 @foo = global i32 0
 @bar = global i32 0
diff --git a/test/ELF/lto/linker-script-symbols-ipo.ll b/test/ELF/lto/linker-script-symbols-ipo.ll
index ba12bd5..f22f134 100644
--- a/test/ELF/lto/linker-script-symbols-ipo.ll
+++ b/test/ELF/lto/linker-script-symbols-ipo.ll
@@ -20,7 +20,7 @@
 ; NOIPO:      _start:
 ; NOIPO-NEXT:   jmp -21 <foo>
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define i32 @bar() {
diff --git a/test/ELF/lto/linker-script-symbols.ll b/test/ELF/lto/linker-script-symbols.ll
index 1fdafef..155cd20 100644
--- a/test/ELF/lto/linker-script-symbols.ll
+++ b/test/ELF/lto/linker-script-symbols.ll
@@ -19,7 +19,7 @@
 ; CHECK-NOT:  zed
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @bar() {
   ret void
diff --git a/test/ELF/lto/linkonce-odr.ll b/test/ELF/lto/linkonce-odr.ll
index 4423351..cb801a5 100644
--- a/test/ELF/lto/linkonce-odr.ll
+++ b/test/ELF/lto/linkonce-odr.ll
@@ -4,7 +4,7 @@
 ; RUN: ld.lld %t1.o %t2.o -o %t.so -shared -save-temps
 ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 declare void @f()
 
diff --git a/test/ELF/lto/linkonce.ll b/test/ELF/lto/linkonce.ll
index 6dba6a3..172c034 100644
--- a/test/ELF/lto/linkonce.ll
+++ b/test/ELF/lto/linkonce.ll
@@ -4,7 +4,7 @@
 ; RUN: ld.lld %t1.o %t2.o -o %t.so -shared -save-temps
 ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 declare void @f()
 
diff --git a/test/ELF/lto/lto-start.ll b/test/ELF/lto/lto-start.ll
index d50b488..e39c35f 100644
--- a/test/ELF/lto/lto-start.ll
+++ b/test/ELF/lto/lto-start.ll
@@ -16,7 +16,7 @@
 ; CHECK-NEXT: Section: .text
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @_start() {
   ret void
diff --git a/test/ELF/lto/ltopasses-basic.ll b/test/ELF/lto/ltopasses-basic.ll
index 6789bdc..8489e70 100644
--- a/test/ELF/lto/ltopasses-basic.ll
+++ b/test/ELF/lto/ltopasses-basic.ll
@@ -3,7 +3,7 @@
 ; RUN: ld.lld %t.o -o %t.so -save-temps -mllvm -debug-pass=Arguments -shared 2>&1 | FileCheck %s --check-prefix=MLLVM
 ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ctor, i8* null }]
diff --git a/test/ELF/lto/ltopasses-custom.ll b/test/ELF/lto/ltopasses-custom.ll
index 23f1564..f0322f8 100644
--- a/test/ELF/lto/ltopasses-custom.ll
+++ b/test/ELF/lto/ltopasses-custom.ll
@@ -6,7 +6,7 @@
 ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s
 ; RUN: llvm-dis %t2.so.0.4.opt.bc -o - | FileCheck %s --check-prefix=ATOMIC
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @barrier() {
diff --git a/test/ELF/lto/metadata.ll b/test/ELF/lto/metadata.ll
index 238b5bd..c35eeca 100644
--- a/test/ELF/lto/metadata.ll
+++ b/test/ELF/lto/metadata.ll
@@ -2,7 +2,7 @@
 ; RUN: llvm-as %s -o %t1.o
 ; RUN: ld.lld %t1.o %t1.o -o %t.so -shared
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define weak void @foo(i32* %p) {
diff --git a/test/ELF/lto/mix-platforms.ll b/test/ELF/lto/mix-platforms.ll
index 3478caa..4625f87 100644
--- a/test/ELF/lto/mix-platforms.ll
+++ b/test/ELF/lto/mix-platforms.ll
@@ -4,7 +4,7 @@
 ; RUN: llvm-as %s -o %tx64.o
 ; RUN: not ld.lld %ti386.so %tx64.o -o %t 2>&1 | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 ; CHECK: {{.*}}x64.o is incompatible with {{.*}}i386.so
diff --git a/test/ELF/lto/mix-platforms2.ll b/test/ELF/lto/mix-platforms2.ll
index 1bd989e..7b5c956 100644
--- a/test/ELF/lto/mix-platforms2.ll
+++ b/test/ELF/lto/mix-platforms2.ll
@@ -5,5 +5,5 @@
 
 ; CHECK: {{.*}}x64.o is incompatible with {{.*}}i386.o
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
diff --git a/test/ELF/lto/module-asm.ll b/test/ELF/lto/module-asm.ll
index eaf2762..f3644f4 100644
--- a/test/ELF/lto/module-asm.ll
+++ b/test/ELF/lto/module-asm.ll
@@ -3,7 +3,7 @@
 ; RUN: ld.lld %t.o -o %t
 ; RUN: llvm-nm %t | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 module asm ".text"
diff --git a/test/ELF/lto/new-pass-manager.ll b/test/ELF/lto/new-pass-manager.ll
index 918b505..84f4ad1 100644
--- a/test/ELF/lto/new-pass-manager.ll
+++ b/test/ELF/lto/new-pass-manager.ll
@@ -10,5 +10,5 @@
 ; CHECK: Starting llvm::Module pass manager run
 ; CHECK: Finished llvm::Module pass manager run
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
diff --git a/test/ELF/lto/obj-path.ll b/test/ELF/lto/obj-path.ll
index 0f720d7..07e30e2 100644
--- a/test/ELF/lto/obj-path.ll
+++ b/test/ELF/lto/obj-path.ll
@@ -21,7 +21,7 @@
 ; NM2: T g
 ; ELF2: Format: ELF64-x86-64
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @g(...)
diff --git a/test/ELF/lto/opt-level.ll b/test/ELF/lto/opt-level.ll
index 5c4ec43..94c96c7 100644
--- a/test/ELF/lto/opt-level.ll
+++ b/test/ELF/lto/opt-level.ll
@@ -28,7 +28,7 @@
 ; RUN:   FileCheck --check-prefix=INVALIDNEGATIVE2 %s
 ; INVALIDNEGATIVE2: invalid optimization level for LTO: 4294967295
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 ; CHECK-O0: foo
diff --git a/test/ELF/lto/opt-remarks.ll b/test/ELF/lto/opt-remarks.ll
index 013e28e..8132b75 100644
--- a/test/ELF/lto/opt-remarks.ll
+++ b/test/ELF/lto/opt-remarks.ll
@@ -56,7 +56,7 @@
 
 ; YAML-PASSES: Pass:            inline
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-scei-ps4"
 
 declare i32 @patatino()
diff --git a/test/ELF/lto/parallel-internalize.ll b/test/ELF/lto/parallel-internalize.ll
index 3b1b106..1d3399b 100644
--- a/test/ELF/lto/parallel-internalize.ll
+++ b/test/ELF/lto/parallel-internalize.ll
@@ -59,7 +59,7 @@
 ; CHECK-NEXT: DynamicSymbols [
 ; CHECK-NEXT: ]
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 ; CHECK0: U bar
diff --git a/test/ELF/lto/parallel.ll b/test/ELF/lto/parallel.ll
index 4ba3fd6..f400e43 100644
--- a/test/ELF/lto/parallel.ll
+++ b/test/ELF/lto/parallel.ll
@@ -5,7 +5,7 @@
 ; RUN: llvm-nm %t.lto.o | FileCheck --check-prefix=CHECK0 %s
 ; RUN: llvm-nm %t1.lto.o | FileCheck --check-prefix=CHECK1 %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 ; CHECK0-NOT: bar
diff --git a/test/ELF/lto/pic.ll b/test/ELF/lto/pic.ll
index abc514d..bedbb1c 100644
--- a/test/ELF/lto/pic.ll
+++ b/test/ELF/lto/pic.ll
@@ -10,7 +10,7 @@
 ; CHECK-NEXT:   }
 ; CHECK-NEXT: ]
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @bar()
diff --git a/test/ELF/lto/relax-relocs.ll b/test/ELF/lto/relax-relocs.ll
index 80e5dac..a375d25 100644
--- a/test/ELF/lto/relax-relocs.ll
+++ b/test/ELF/lto/relax-relocs.ll
@@ -6,7 +6,7 @@
 ; Test that we produce R_X86_64_REX_GOTPCRELX instead of R_X86_64_GOTPCREL
 ; CHECK: R_X86_64_REX_GOTPCRELX foo
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @foo = external global i32
diff --git a/test/ELF/lto/relocatable.ll b/test/ELF/lto/relocatable.ll
index 9c7a0c2..a67eb12 100644
--- a/test/ELF/lto/relocatable.ll
+++ b/test/ELF/lto/relocatable.ll
@@ -60,7 +60,7 @@
 ; CHECK-NEXT:   }
 ; CHECK-NEXT: ]
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @foo() {
diff --git a/test/ELF/lto/relocation-model.ll b/test/ELF/lto/relocation-model.ll
index 825e9fe..beb693e 100644
--- a/test/ELF/lto/relocation-model.ll
+++ b/test/ELF/lto/relocation-model.ll
@@ -45,7 +45,7 @@
 ; PIC: R_X86_64_REX_GOTPCRELX foo
 ; STATIC: R_X86_64_PC32 foo
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @foo = external global i32
diff --git a/test/ELF/lto/resolution.ll b/test/ELF/lto/resolution.ll
index d4ab1bf..ce6f4d0 100644
--- a/test/ELF/lto/resolution.ll
+++ b/test/ELF/lto/resolution.ll
@@ -21,7 +21,7 @@
 ; CHECK-NEXT:   0000: 09000000 |{{.*}}|
 ; CHECK-NEXT: )
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @a = weak global i32 8
diff --git a/test/ELF/lto/sample-profile.ll b/test/ELF/lto/sample-profile.ll
index a8b1104..989ed05 100644
--- a/test/ELF/lto/sample-profile.ll
+++ b/test/ELF/lto/sample-profile.ll
@@ -10,7 +10,7 @@
 ; RUN: ld.lld --plugin-opt=sample-profile=%p/Inputs/sample-profile.prof %t1.o %t2.o -o %t3
 ; RUN  opt -S %t3.lto.o | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 ; CHECK: ProfileSummary
diff --git a/test/ELF/lto/save-temps.ll b/test/ELF/lto/save-temps.ll
index b34134c..b71cd1e 100644
--- a/test/ELF/lto/save-temps.ll
+++ b/test/ELF/lto/save-temps.ll
@@ -17,7 +17,7 @@
 ; RUN: llvm-dis a.out.0.0.preopt.bc
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @foo() {
   ret void
diff --git a/test/ELF/lto/section-name.ll b/test/ELF/lto/section-name.ll
index 0ecc377..ac74492 100644
--- a/test/ELF/lto/section-name.ll
+++ b/test/ELF/lto/section-name.ll
@@ -5,7 +5,7 @@
 ; RUN: ld.lld %t.o -o %t.so -shared --gc-sections
 ; RUN: llvm-readelf -S %t.so | FileCheck --check-prefix=GC %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @foo = hidden global i32 42, section "foo_section"
diff --git a/test/ELF/lto/setting-dso-local.ll b/test/ELF/lto/setting-dso-local.ll
index d2d9c29..542db40 100644
--- a/test/ELF/lto/setting-dso-local.ll
+++ b/test/ELF/lto/setting-dso-local.ll
@@ -6,7 +6,7 @@
 
 ; We used to crash setting foobar to non-dso_local
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @foobar = external hidden global i32
diff --git a/test/ELF/lto/shlib-undefined.ll b/test/ELF/lto/shlib-undefined.ll
index b2f0d4a..babbf6a 100644
--- a/test/ELF/lto/shlib-undefined.ll
+++ b/test/ELF/lto/shlib-undefined.ll
@@ -16,7 +16,7 @@
 ; CHECK-NEXT: }
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @_start() {
   ret void
diff --git a/test/ELF/lto/start-lib.ll b/test/ELF/lto/start-lib.ll
index 024d887..d46e5d5 100644
--- a/test/ELF/lto/start-lib.ll
+++ b/test/ELF/lto/start-lib.ll
@@ -19,7 +19,7 @@
 ; TEST3-NOT: Name: bar
 ; TEST3-NOT: Name: foo
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @_start() {
diff --git a/test/ELF/lto/thin-archivecollision.ll b/test/ELF/lto/thin-archivecollision.ll
index 554c2b0..47a0bee 100644
--- a/test/ELF/lto/thin-archivecollision.ll
+++ b/test/ELF/lto/thin-archivecollision.ll
@@ -23,7 +23,7 @@
 ; CHECK: T blah
 ; CHECK: T foo
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-scei-ps4"
 
 define i32 @_start() {
diff --git a/test/ELF/lto/thinlto-cant-write-index.ll b/test/ELF/lto/thinlto-cant-write-index.ll
index 784fbaf..d071406 100644
--- a/test/ELF/lto/thinlto-cant-write-index.ll
+++ b/test/ELF/lto/thinlto-cant-write-index.ll
@@ -12,7 +12,7 @@
 ; RUN: chmod u+w %t2.o.thinlto.bc
 ; CHECK: cannot open {{.*}}2.o.thinlto.bc: {{P|p}}ermission denied
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @g(...)
diff --git a/test/ELF/lto/thinlto-debug-fission.ll b/test/ELF/lto/thinlto-debug-fission.ll
index b779ad4..8855d10 100644
--- a/test/ELF/lto/thinlto-debug-fission.ll
+++ b/test/ELF/lto/thinlto-debug-fission.ll
@@ -9,7 +9,7 @@
 
 ; CHECK: Format: ELF64-x86-64
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @g(...)
diff --git a/test/ELF/lto/thinlto-emit-imports.ll b/test/ELF/lto/thinlto-emit-imports.ll
index cae7922..f85f409 100644
--- a/test/ELF/lto/thinlto-emit-imports.ll
+++ b/test/ELF/lto/thinlto-emit-imports.ll
@@ -43,7 +43,7 @@
 ; RUN: not ls %t2.o.imports
 ; RUN: not ls %t3.o.imports
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @g(...)
diff --git a/test/ELF/lto/thinlto-index-file.ll b/test/ELF/lto/thinlto-index-file.ll
index 91f0b29..18f4350 100644
--- a/test/ELF/lto/thinlto-index-file.ll
+++ b/test/ELF/lto/thinlto-index-file.ll
@@ -12,7 +12,7 @@
 ; CHECK: {{.*}}thinlto-index-file.ll.tmp2.o
 ; CHECK: {{.*}}thinlto-index-file.ll.tmp3.o
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @g(...)
diff --git a/test/ELF/lto/thinlto-index-only.ll b/test/ELF/lto/thinlto-index-only.ll
index 594b4bc..86510f6 100644
--- a/test/ELF/lto/thinlto-index-only.ll
+++ b/test/ELF/lto/thinlto-index-only.ll
@@ -73,7 +73,7 @@
 ; BACKEND2-NEXT: <COMBINED
 ; BACKEND2-NEXT: </GLOBALVAL_SUMMARY_BLOCK
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @g(...)
diff --git a/test/ELF/lto/thinlto-no-index.ll b/test/ELF/lto/thinlto-no-index.ll
index f80cf0e..d328eef 100644
--- a/test/ELF/lto/thinlto-no-index.ll
+++ b/test/ELF/lto/thinlto-no-index.ll
@@ -12,7 +12,7 @@
 ; RUN: not ls %t2.o.thinlto.bc
 ; RUN: not ls %t3.o.thinlto.bc
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @g(...)
diff --git a/test/ELF/lto/thinlto-obj-path.ll b/test/ELF/lto/thinlto-obj-path.ll
index 2806d16..8878c89 100644
--- a/test/ELF/lto/thinlto-obj-path.ll
+++ b/test/ELF/lto/thinlto-obj-path.ll
@@ -12,7 +12,7 @@
 
 ; CHECK: Format: ELF64-x86-64
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @g(...)
diff --git a/test/ELF/lto/thinlto-object-suffix-replace.ll b/test/ELF/lto/thinlto-object-suffix-replace.ll
index c58a1f2..1749f81 100644
--- a/test/ELF/lto/thinlto-object-suffix-replace.ll
+++ b/test/ELF/lto/thinlto-object-suffix-replace.ll
@@ -36,7 +36,7 @@
 ; RUN: --plugin-opt=thinlto-object-suffix-replace=".abc;.o" -shared %t1.thinlink.bc -o /dev/null
 ; RUN: ls %t1.thinlink.bc.thinlto.bc
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @f() {
diff --git a/test/ELF/lto/thinlto-prefix-replace.ll b/test/ELF/lto/thinlto-prefix-replace.ll
index c276dae..67b11c7 100644
--- a/test/ELF/lto/thinlto-prefix-replace.ll
+++ b/test/ELF/lto/thinlto-prefix-replace.ll
@@ -14,7 +14,7 @@
 ; RUN: not ld.lld --plugin-opt=thinlto-index-only --plugin-opt=thinlto-prefix-replace=abc:def -shared %t/oldpath/thinlto_prefix_replace.o -o %t/thinlto_prefix_replace 2>&1 | FileCheck %s --check-prefix=ERR
 ; ERR: --plugin-opt=thinlto-prefix-replace= expects 'old;new' format, but got abc:def
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @f() {
diff --git a/test/ELF/lto/thinlto.ll b/test/ELF/lto/thinlto.ll
index 51c82ec..6376115 100644
--- a/test/ELF/lto/thinlto.ll
+++ b/test/ELF/lto/thinlto.ll
@@ -24,7 +24,7 @@
 ; NM1: T f
 ; NM2: T g
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @g(...)
diff --git a/test/ELF/lto/timepasses.ll b/test/ELF/lto/timepasses.ll
index 86c9b8e..97eda05 100644
--- a/test/ELF/lto/timepasses.ll
+++ b/test/ELF/lto/timepasses.ll
@@ -3,7 +3,7 @@
 ; RUN: env LLD_IN_TEST=0 ld.lld %t.o -o %t.so -shared -mllvm \
 ; RUN:   -time-passes 2>&1 | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @patatino() {
diff --git a/test/ELF/lto/tls-mixed.ll b/test/ELF/lto/tls-mixed.ll
index 9d5a693..2016e23 100644
--- a/test/ELF/lto/tls-mixed.ll
+++ b/test/ELF/lto/tls-mixed.ll
@@ -3,7 +3,7 @@
 ; RUN: llvm-mc %p/Inputs/tls-mixed.s -o %t2.o -filetype=obj -triple=x86_64-pc-linux
 ; RUN: ld.lld %t1.o %t2.o -o %t.so -shared
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 ; Should not encounter TLS-ness mismatch for @foo
diff --git a/test/ELF/lto/tls-preserve.ll b/test/ELF/lto/tls-preserve.ll
index a3d767c..f99a1ae 100644
--- a/test/ELF/lto/tls-preserve.ll
+++ b/test/ELF/lto/tls-preserve.ll
@@ -4,7 +4,7 @@
 ; RUN: ld.lld -shared %t1.o -o %t1
 ; RUN: llvm-readobj --symbols %t1 | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @tsp_int = thread_local global i32 1
diff --git a/test/ELF/lto/type-merge.ll b/test/ELF/lto/type-merge.ll
index 985c44b..c020703 100644
--- a/test/ELF/lto/type-merge.ll
+++ b/test/ELF/lto/type-merge.ll
@@ -4,7 +4,7 @@
 ; RUN: ld.lld %t.o %t2.o -o %t -shared -save-temps
 ; RUN: llvm-dis < %t.0.0.preopt.bc | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define void @foo()  {
diff --git a/test/ELF/lto/type-merge2.ll b/test/ELF/lto/type-merge2.ll
index 5944be7..95fed45 100644
--- a/test/ELF/lto/type-merge2.ll
+++ b/test/ELF/lto/type-merge2.ll
@@ -5,7 +5,7 @@
 ; RUN: llvm-dis %t.so.0.0.preopt.bc -o - | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 %zed = type { i8 }
 define void @foo()  {
diff --git a/test/ELF/lto/undef-mixed.ll b/test/ELF/lto/undef-mixed.ll
index defda59..0d4827a 100644
--- a/test/ELF/lto/undef-mixed.ll
+++ b/test/ELF/lto/undef-mixed.ll
@@ -12,7 +12,7 @@
 ; CHECK-NEXT: Other: 0
 ; CHECK-NEXT: Section: .text
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @bar()
diff --git a/test/ELF/lto/undef-weak.ll b/test/ELF/lto/undef-weak.ll
index a84adb4..e3b623c 100644
--- a/test/ELF/lto/undef-weak.ll
+++ b/test/ELF/lto/undef-weak.ll
@@ -8,7 +8,7 @@
 ; RUN: llvm-readobj --symbols %t2.so | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 declare extern_weak void @f()
 define void @foo() {
diff --git a/test/ELF/lto/undef.ll b/test/ELF/lto/undef.ll
index 74127db..2ccebb6 100644
--- a/test/ELF/lto/undef.ll
+++ b/test/ELF/lto/undef.ll
@@ -3,7 +3,7 @@
 ; RUN: ld.lld %t.o -o %t.so -shared
 ; RUN: llvm-readobj --symbols %t.so | FileCheck %s
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 declare void @bar()
 define void @foo() {
diff --git a/test/ELF/lto/undefined-puts.ll b/test/ELF/lto/undefined-puts.ll
index 8f98789..b11d765 100644
--- a/test/ELF/lto/undefined-puts.ll
+++ b/test/ELF/lto/undefined-puts.ll
@@ -5,7 +5,7 @@
 ; RUN: ld.lld %t1.so %t2.o -o %t
 ; RUN: llvm-readobj --dyn-syms --dyn-relocations %t | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @.str = private unnamed_addr constant [6 x i8] c"blah\0A\00", align 1
diff --git a/test/ELF/lto/unnamed-addr-comdat.ll b/test/ELF/lto/unnamed-addr-comdat.ll
index 38b08ab..52abc21 100644
--- a/test/ELF/lto/unnamed-addr-comdat.ll
+++ b/test/ELF/lto/unnamed-addr-comdat.ll
@@ -4,7 +4,7 @@
 ; RUN: llvm-dis %t.so.0.2.internalize.bc -o - | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 $foo = comdat any
 @foo = linkonce_odr unnamed_addr constant i32 42, comdat
diff --git a/test/ELF/lto/unnamed-addr-drop.ll b/test/ELF/lto/unnamed-addr-drop.ll
index ad662b7..2b65803 100644
--- a/test/ELF/lto/unnamed-addr-drop.ll
+++ b/test/ELF/lto/unnamed-addr-drop.ll
@@ -5,7 +5,7 @@
 ; RUN: llvm-dis %t.so.0.2.internalize.bc -o - | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 @foo = weak constant i32 41
 
diff --git a/test/ELF/lto/unnamed-addr-lib.ll b/test/ELF/lto/unnamed-addr-lib.ll
index 0c47468..7b9dd53 100644
--- a/test/ELF/lto/unnamed-addr-lib.ll
+++ b/test/ELF/lto/unnamed-addr-lib.ll
@@ -14,7 +14,7 @@
 ; CHECK: @foo = internal unnamed_addr constant i8 42
 ; CHECK: @bar = weak_odr unnamed_addr constant i8 42
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @foo = linkonce_odr unnamed_addr constant i8 42
diff --git a/test/ELF/lto/unnamed-addr.ll b/test/ELF/lto/unnamed-addr.ll
index 7504fdf..5dcc7b0 100644
--- a/test/ELF/lto/unnamed-addr.ll
+++ b/test/ELF/lto/unnamed-addr.ll
@@ -4,7 +4,7 @@
 ; RUN: llvm-dis %t.so.0.4.opt.bc -o - | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 @a = internal unnamed_addr constant i8 42
 
diff --git a/test/ELF/lto/verify-invalid.ll b/test/ELF/lto/verify-invalid.ll
index 9fa0f9e..d44c483 100644
--- a/test/ELF/lto/verify-invalid.ll
+++ b/test/ELF/lto/verify-invalid.ll
@@ -8,7 +8,7 @@
 ; RUN:   --plugin-opt=disable-verify 2>&1 | FileCheck -check-prefix=DISABLE %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @_start() {
   ret void
diff --git a/test/ELF/lto/version-script.ll b/test/ELF/lto/version-script.ll
index ae6441b..52b9afc 100644
--- a/test/ELF/lto/version-script.ll
+++ b/test/ELF/lto/version-script.ll
@@ -6,7 +6,7 @@
 ; RUN: llvm-readobj --dyn-syms %t2 | FileCheck --check-prefix=DSO %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define void @foo() {
   ret void
diff --git a/test/ELF/lto/version-script2.ll b/test/ELF/lto/version-script2.ll
index 29fa3f9..cd1da74 100644
--- a/test/ELF/lto/version-script2.ll
+++ b/test/ELF/lto/version-script2.ll
@@ -10,7 +10,7 @@
 
 ; CHECK: Name: foo@@VER1 (
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 module asm ".global foo"
diff --git a/test/ELF/lto/visibility.ll b/test/ELF/lto/visibility.ll
index 11518ab..7315b8f 100644
--- a/test/ELF/lto/visibility.ll
+++ b/test/ELF/lto/visibility.ll
@@ -25,7 +25,7 @@
 ; CHECK-NEXT: ]
 ; CHECK-NEXT: Section: .data
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare hidden void @g()
diff --git a/test/ELF/lto/weak.ll b/test/ELF/lto/weak.ll
index d683c34..d2891a9 100644
--- a/test/ELF/lto/weak.ll
+++ b/test/ELF/lto/weak.ll
@@ -7,7 +7,7 @@
 ; RUN: llvm-readobj --symbols %t.so | FileCheck %s
 
 target triple = "x86_64-unknown-linux-gnu"
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 
 define weak void @f() {
   ret void
diff --git a/test/ELF/lto/weakodr-visibility.ll b/test/ELF/lto/weakodr-visibility.ll
index 496de3c..b041d79 100644
--- a/test/ELF/lto/weakodr-visibility.ll
+++ b/test/ELF/lto/weakodr-visibility.ll
@@ -32,7 +32,7 @@
 ; SECOND:      foo:
 ; SECOND-NEXT:   movl    $42, %eax
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 define weak_odr i32 @foo(i8* %this) {
diff --git a/test/ELF/lto/wrap-1.ll b/test/ELF/lto/wrap-1.ll
index 310a7da..5ff4627 100644
--- a/test/ELF/lto/wrap-1.ll
+++ b/test/ELF/lto/wrap-1.ll
@@ -23,7 +23,7 @@
 ; RESOLS: ,__wrap_bar,plx
 ; RESOLS: ,__real_bar,plxr
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @bar()
diff --git a/test/ELF/lto/wrap-2.ll b/test/ELF/lto/wrap-2.ll
index 7a312f8..2050530 100644
--- a/test/ELF/lto/wrap-2.ll
+++ b/test/ELF/lto/wrap-2.ll
@@ -36,7 +36,7 @@
 ; BIND-NEXT: Size:
 ; BIND-NEXT: Binding: Local
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 declare void @bar()
diff --git a/test/wasm/lto/incompatible.ll b/test/wasm/lto/incompatible.ll
index ee98cb4..6f7c154 100644
--- a/test/wasm/lto/incompatible.ll
+++ b/test/wasm/lto/incompatible.ll
@@ -2,7 +2,7 @@
 ; RUN: llvm-as %s -o %t.bc
 ; RUN: not wasm-ld %t.bc -o out.wasm 2>&1 | FileCheck %s
 
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 ; CHECK: {{.*}}incompatible.ll.tmp.bc: machine type must be wasm32