Skip to content

Commit b4cf63d

Browse files
authored
[X86] Remove obsolete tablegen rules for near data in small static code model (#84523)
These should be already handled by other code. Removing the kernel code model rules right above it cause bss_pagealigned.ll to fail by using a movabsq to get the address of a global, haven't figured out where that code is yet.
1 parent 568368a commit b4cf63d

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

llvm/lib/Target/X86/X86InstrCompiler.td

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,28 +1247,6 @@ def : Pat<(i64 (X86Wrapper mcsym:$dst)),
12471247
def : Pat<(i64 (X86Wrapper tblockaddress:$dst)),
12481248
(MOV64ri32 tblockaddress:$dst)>, Requires<[KernelCode]>;
12491249

1250-
// If we have small model and -static mode, it is safe to store global addresses
1251-
// directly as immediates. FIXME: This is really a hack, the 'imm' predicate
1252-
// for MOV64mi32 should handle this sort of thing.
1253-
def : Pat<(store (i64 (X86Wrapper tconstpool:$src)), addr:$dst),
1254-
(MOV64mi32 addr:$dst, tconstpool:$src)>,
1255-
Requires<[NearData, IsNotPIC]>;
1256-
def : Pat<(store (i64 (X86Wrapper tjumptable:$src)), addr:$dst),
1257-
(MOV64mi32 addr:$dst, tjumptable:$src)>,
1258-
Requires<[NearData, IsNotPIC]>;
1259-
def : Pat<(store (i64 (X86Wrapper tglobaladdr:$src)), addr:$dst),
1260-
(MOV64mi32 addr:$dst, tglobaladdr:$src)>,
1261-
Requires<[NearData, IsNotPIC]>;
1262-
def : Pat<(store (i64 (X86Wrapper texternalsym:$src)), addr:$dst),
1263-
(MOV64mi32 addr:$dst, texternalsym:$src)>,
1264-
Requires<[NearData, IsNotPIC]>;
1265-
def : Pat<(store (i64 (X86Wrapper mcsym:$src)), addr:$dst),
1266-
(MOV64mi32 addr:$dst, mcsym:$src)>,
1267-
Requires<[NearData, IsNotPIC]>;
1268-
def : Pat<(store (i64 (X86Wrapper tblockaddress:$src)), addr:$dst),
1269-
(MOV64mi32 addr:$dst, tblockaddress:$src)>,
1270-
Requires<[NearData, IsNotPIC]>;
1271-
12721250
def : Pat<(i32 (X86RecoverFrameAlloc mcsym:$dst)), (MOV32ri mcsym:$dst)>;
12731251
def : Pat<(i64 (X86RecoverFrameAlloc mcsym:$dst)), (MOV64ri mcsym:$dst)>;
12741252

0 commit comments

Comments
 (0)