Skip to content

Commit 976aa62

Browse files
committed
Try selecting atomic loads with patfrags again.
1 parent bba1b12 commit 976aa62

16 files changed

+477
-310
lines changed

llvm/include/llvm/Target/TargetSelectionDAG.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def SDTAtomicStore : SDTypeProfile<0, 2, [
318318
SDTCisInt<0>, SDTCisPtrTy<1>
319319
]>;
320320
def SDTAtomicLoad : SDTypeProfile<1, 1, [
321-
SDTCisInt<0>, SDTCisPtrTy<1>
321+
SDTCisPtrTy<1>
322322
]>;
323323

324324
class SDCallSeqStart<list<SDTypeConstraint> constraints> :

llvm/lib/Target/PowerPC/PPCInstrInfo.td

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5035,12 +5035,12 @@ defm : TrapExtendedMnemonic<"lng", 6>;
50355035
defm : TrapExtendedMnemonic<"u", 31>;
50365036

50375037
// Atomic loads
5038-
def : Pat<(atomic_load_8 DForm:$src), (LBZ memri:$src)>;
5039-
def : Pat<(atomic_load_16 DForm:$src), (LHZ memri:$src)>;
5040-
def : Pat<(atomic_load_32 DForm:$src), (LWZ memri:$src)>;
5041-
def : Pat<(atomic_load_8 XForm:$src), (LBZX memrr:$src)>;
5042-
def : Pat<(atomic_load_16 XForm:$src), (LHZX memrr:$src)>;
5043-
def : Pat<(atomic_load_32 XForm:$src), (LWZX memrr:$src)>;
5038+
def : Pat<(iAny (atomic_load_8 DForm:$src)), (LBZ memri:$src)>;
5039+
def : Pat<(iAny (atomic_load_16 DForm:$src)), (LHZ memri:$src)>;
5040+
def : Pat<(iAny (atomic_load_32 DForm:$src)), (LWZ memri:$src)>;
5041+
def : Pat<(iAny (atomic_load_8 XForm:$src)), (LBZX memrr:$src)>;
5042+
def : Pat<(iAny (atomic_load_16 XForm:$src)), (LHZX memrr:$src)>;
5043+
def : Pat<(iAny (atomic_load_32 XForm:$src)), (LWZX memrr:$src)>;
50445044

50455045
// Atomic stores
50465046
def : Pat<(atomic_store_8 i32:$val, DForm:$ptr), (STB gprc:$val, memri:$ptr)>;

llvm/lib/Target/PowerPC/PPCInstrP10.td

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,13 +1289,13 @@ let Predicates = [PCRelativeMemops] in {
12891289
(PSTXVpc $XS, $ga, 0)>;
12901290

12911291
// Atomic Load
1292-
def : Pat<(atomic_load_8 (PPCmatpcreladdr PCRelForm:$ga)),
1292+
def : Pat<(iAny (atomic_load_8 (PPCmatpcreladdr PCRelForm:$ga))),
12931293
(PLBZpc $ga, 0)>;
1294-
def : Pat<(atomic_load_16 (PPCmatpcreladdr PCRelForm:$ga)),
1294+
def : Pat<(iAny (atomic_load_16 (PPCmatpcreladdr PCRelForm:$ga))),
12951295
(PLHZpc $ga, 0)>;
1296-
def : Pat<(atomic_load_32 (PPCmatpcreladdr PCRelForm:$ga)),
1296+
def : Pat<(iAny (atomic_load_32 (PPCmatpcreladdr PCRelForm:$ga))),
12971297
(PLWZpc $ga, 0)>;
1298-
def : Pat<(atomic_load_64 (PPCmatpcreladdr PCRelForm:$ga)),
1298+
def : Pat<(iAny (atomic_load_64 (PPCmatpcreladdr PCRelForm:$ga))),
12991299
(PLDpc $ga, 0)>;
13001300

13011301
// Atomic Store
@@ -2347,10 +2347,10 @@ let Predicates = [PrefixInstrs] in {
23472347
def : Pat<(store f64:$FRS, PDForm:$dst), (PSTFD $FRS, memri34:$dst)>;
23482348

23492349
// Atomic Load
2350-
def : Pat<(atomic_load_8 PDForm:$src), (PLBZ memri34:$src)>;
2351-
def : Pat<(atomic_load_16 PDForm:$src), (PLHZ memri34:$src)>;
2352-
def : Pat<(atomic_load_32 PDForm:$src), (PLWZ memri34:$src)>;
2353-
def : Pat<(atomic_load_64 PDForm:$src), (PLD memri34:$src)>;
2350+
def : Pat<(iAny (atomic_load_8 PDForm:$src)), (PLBZ memri34:$src)>;
2351+
def : Pat<(iAny (atomic_load_16 PDForm:$src)), (PLHZ memri34:$src)>;
2352+
def : Pat<(iAny (atomic_load_32 PDForm:$src)), (PLWZ memri34:$src)>;
2353+
def : Pat<(iAny (atomic_load_64 PDForm:$src)), (PLD memri34:$src)>;
23542354

23552355
// Atomic Store
23562356
def : Pat<(atomic_store_8 i32:$RS, PDForm:$dst), (PSTB $RS, memri34:$dst)>;

llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp

Lines changed: 29 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -344,12 +344,12 @@ class SystemZDAGToDAGISel : public SelectionDAGISel {
344344
// requirements for a PC-relative access.
345345
bool storeLoadIsAligned(SDNode *N) const;
346346

347+
// Return the load extension type of a load or atomic load.
348+
ISD::LoadExtType getLoadExtType(SDNode *N) const;
349+
347350
// Try to expand a boolean SELECT_CCMASK using an IPM sequence.
348351
SDValue expandSelectBoolean(SDNode *Node);
349352

350-
// Convert ATOMIC_LOADs to LOADs to facilitate instruction selection.
351-
void convertATOMIC_LOADs(SDNode *Node, unsigned Depth = 0);
352-
353353
public:
354354
static char ID;
355355

@@ -1510,16 +1510,17 @@ bool SystemZDAGToDAGISel::storeLoadCanUseBlockBinary(SDNode *N,
15101510

15111511
bool SystemZDAGToDAGISel::storeLoadIsAligned(SDNode *N) const {
15121512

1513-
auto *MemAccess = cast<LSBaseSDNode>(N);
1513+
auto *MemAccess = cast<MemSDNode>(N);
1514+
auto *LdSt = dyn_cast<LSBaseSDNode>(MemAccess);
15141515
TypeSize StoreSize = MemAccess->getMemoryVT().getStoreSize();
15151516
SDValue BasePtr = MemAccess->getBasePtr();
15161517
MachineMemOperand *MMO = MemAccess->getMemOperand();
15171518
assert(MMO && "Expected a memory operand.");
15181519

15191520
// The memory access must have a proper alignment and no index register.
1520-
// ATOMIC_LOADs do not have the offset operand.
1521+
// Only load and store nodes have the offset operand (atomic loads do not).
15211522
if (MemAccess->getAlign().value() < StoreSize ||
1522-
(!MMO->isAtomic() && !MemAccess->getOffset().isUndef()))
1523+
(LdSt && !LdSt->getOffset().isUndef()))
15231524
return false;
15241525

15251526
// The MMO must not have an unaligned offset.
@@ -1549,35 +1550,15 @@ bool SystemZDAGToDAGISel::storeLoadIsAligned(SDNode *N) const {
15491550
return true;
15501551
}
15511552

1552-
// This is a hack to convert ATOMIC_LOADs to LOADs in the last minute just
1553-
// before instruction selection begins. It would have been easier if
1554-
// ATOMIC_LOAD nodes would instead always be built by SelectionDAGBuilder as
1555-
// LOADs with an atomic MMO and properly handled as such in DAGCombiner, but
1556-
// until that changes they need to remain as ATOMIC_LOADs until all
1557-
// DAGCombining is done. Convert Node or any of its operands from
1558-
// ATOMIC_LOAD to LOAD.
1559-
void SystemZDAGToDAGISel::convertATOMIC_LOADs(SDNode *Node, unsigned Depth) {
1560-
if (Depth > 1) // Chain operands are also followed so this seems enough.
1561-
return;
1562-
if (Node->getOpcode() == ISD::ATOMIC_LOAD) {
1563-
auto *ALoad = cast<AtomicSDNode>(Node);
1564-
// It seems necessary to morph the node as it is not yet being selected.
1565-
LoadSDNode *Ld = cast<LoadSDNode>(CurDAG->MorphNodeTo(
1566-
ALoad, ISD::LOAD, CurDAG->getVTList(ALoad->getValueType(0), MVT::Other),
1567-
{ALoad->getChain(), ALoad->getBasePtr()}));
1568-
// Sanity check the morph. The extension type for an extending load
1569-
// should have been set prior to instruction selection and remain in the
1570-
// morphed node.
1571-
assert(((SDNode *)Ld) == ((SDNode *)ALoad) && "Bad CSE on atomic load.");
1572-
assert(Ld->getMemOperand()->isAtomic() && "Broken MMO.");
1573-
ISD::LoadExtType ETy = Ld->getExtensionType();
1574-
bool IsNonExt = Ld->getMemoryVT().getSizeInBits() ==
1575-
Ld->getValueType(0).getSizeInBits();
1576-
assert(IsNonExt == (ETy == ISD::NON_EXTLOAD) && "Bad extension type.");
1577-
return;
1578-
}
1579-
for (SDValue Op : Node->ops())
1580-
convertATOMIC_LOADs(Op.getNode(), ++Depth);
1553+
ISD::LoadExtType SystemZDAGToDAGISel::getLoadExtType(SDNode *N) const {
1554+
ISD::LoadExtType ETy;
1555+
if (auto *L = dyn_cast<LoadSDNode>(N))
1556+
ETy = L->getExtensionType();
1557+
else if (auto *AL = dyn_cast<AtomicSDNode>(N))
1558+
ETy = AL->getExtensionType();
1559+
else
1560+
llvm_unreachable("Unkown load node type.");
1561+
return ETy;
15811562
}
15821563

15831564
void SystemZDAGToDAGISel::Select(SDNode *Node) {
@@ -1588,9 +1569,6 @@ void SystemZDAGToDAGISel::Select(SDNode *Node) {
15881569
return;
15891570
}
15901571

1591-
// Prepare any ATOMIC_LOAD to be selected as a LOAD with an atomic MMO.
1592-
convertATOMIC_LOADs(Node);
1593-
15941572
unsigned Opcode = Node->getOpcode();
15951573
switch (Opcode) {
15961574
case ISD::OR:
@@ -1783,14 +1761,18 @@ void SystemZDAGToDAGISel::Select(SDNode *Node) {
17831761

17841762
case ISD::ATOMIC_STORE: {
17851763
auto *AtomOp = cast<AtomicSDNode>(Node);
1786-
// Store FP values directly without first moving to a GPR.
1764+
// Store FP values directly without first moving to a GPR. This is needed
1765+
// as long as clang always emits the cast to integer.
17871766
EVT SVT = AtomOp->getMemoryVT();
17881767
SDValue StoredVal = AtomOp->getVal();
17891768
if (SVT.isInteger() && StoredVal->getOpcode() == ISD::BITCAST &&
17901769
StoredVal->getOperand(0).getValueType().isFloatingPoint()) {
17911770
StoredVal = StoredVal->getOperand(0);
17921771
SVT = StoredVal.getValueType();
17931772
}
1773+
// Replace the atomic_store with a regular store and select it. This is
1774+
// ok since we know all store instructions <= 8 bytes are atomic, and the
1775+
// 16 byte case is already handled during lowering.
17941776
StoreSDNode *St = cast<StoreSDNode>(CurDAG->getTruncStore(
17951777
AtomOp->getChain(), SDLoc(AtomOp), StoredVal, AtomOp->getBasePtr(), SVT,
17961778
AtomOp->getMemOperand()));
@@ -1807,6 +1789,14 @@ void SystemZDAGToDAGISel::Select(SDNode *Node) {
18071789
}
18081790
}
18091791

1792+
#ifndef NDEBUG
1793+
if (auto *AL = dyn_cast<AtomicSDNode>(Node))
1794+
if (AL->getOpcode() == ISD::ATOMIC_LOAD)
1795+
assert((AL->getExtensionType() == ISD::NON_EXTLOAD ||
1796+
AL->getMemoryVT().isScalarInteger()) &&
1797+
"Not expecting extending fp atomic_load nodes.");
1798+
#endif
1799+
18101800
SelectCode(Node);
18111801
}
18121802

llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ bool SystemZTargetLowering::hasInlineStackProbe(const MachineFunction &MF) const
916916
return false;
917917
}
918918

919+
// FIXME: Clang emits these casts always regardless of these hooks.
919920
TargetLowering::AtomicExpansionKind
920921
SystemZTargetLowering::shouldCastAtomicLoadInIR(LoadInst *LI) const {
921922
// Lower fp128 the same way as i128.
@@ -6604,7 +6605,8 @@ SDValue SystemZTargetLowering::combineBITCAST(SDNode *N,
66046605
EVT ResVT = N->getValueType(0);
66056606
// Handle atomic loads to load float/double values directly and not via a
66066607
// GPR. Do it before legalization to help in treating the ATOMIC_LOAD the
6607-
// same way as a LOAD, and e.g. emit a REPLICATE.
6608+
// same way as a LOAD, and e.g. emit a REPLICATE. FIXME: This is only
6609+
// needed because clang currently emits these casts always.
66086610
if (auto *ALoad = dyn_cast<AtomicSDNode>(N0))
66096611
if (ALoad->getOpcode() == ISD::ATOMIC_LOAD && InVT.getSizeInBits() <= 64 &&
66106612
ALoad->getExtensionType() == ISD::NON_EXTLOAD &&

llvm/lib/Target/SystemZ/SystemZInstrFP.td

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ defm LoadStoreF128 : MVCLoadStore<load, f128, MVCImm, 15>;
129129
//===----------------------------------------------------------------------===//
130130

131131
let canFoldAsLoad = 1, SimpleBDXLoad = 1, mayLoad = 1 in {
132-
defm LE : UnaryRXPair<"le", 0x78, 0xED64, load, FP32, 4>;
133-
defm LD : UnaryRXPair<"ld", 0x68, 0xED65, load, FP64, 8>;
132+
defm LE : UnaryRXPair<"le", 0x78, 0xED64, z_load, FP32, 4>;
133+
defm LD : UnaryRXPair<"ld", 0x68, 0xED65, z_load, FP64, 8>;
134134

135135
// For z13 we prefer LDE over LE to avoid partial register dependencies.
136136
let isCodeGenOnly = 1 in
@@ -200,14 +200,14 @@ let Predicates = [FeatureNoVectorEnhancements1] in {
200200

201201
// Extend memory floating-point values to wider representations.
202202
let Uses = [FPC], mayRaiseFPException = 1 in {
203-
def LDEB : UnaryRXE<"ldeb", 0xED04, any_extloadf32, FP64, 4>;
203+
def LDEB : UnaryRXE<"ldeb", 0xED04, z_any_extloadf32, FP64, 4>;
204204
def LXEB : UnaryRXE<"lxeb", 0xED06, null_frag, FP128, 4>;
205205
def LXDB : UnaryRXE<"lxdb", 0xED05, null_frag, FP128, 8>;
206206
}
207207
let Predicates = [FeatureNoVectorEnhancements1] in {
208-
def : Pat<(f128 (any_extloadf32 bdxaddr12only:$src)),
208+
def : Pat<(f128 (z_any_extloadf32 bdxaddr12only:$src)),
209209
(LXEB bdxaddr12only:$src)>;
210-
def : Pat<(f128 (any_extloadf64 bdxaddr12only:$src)),
210+
def : Pat<(f128 (z_any_extloadf64 bdxaddr12only:$src)),
211211
(LXDB bdxaddr12only:$src)>;
212212
}
213213

@@ -430,8 +430,8 @@ let Uses = [FPC], mayRaiseFPException = 1,
430430
def ADBR : BinaryRRE<"adbr", 0xB31A, any_fadd, FP64, FP64>;
431431
def AXBR : BinaryRRE<"axbr", 0xB34A, any_fadd, FP128, FP128>;
432432
}
433-
defm AEB : BinaryRXEAndPseudo<"aeb", 0xED0A, any_fadd, FP32, load, 4>;
434-
defm ADB : BinaryRXEAndPseudo<"adb", 0xED1A, any_fadd, FP64, load, 8>;
433+
defm AEB : BinaryRXEAndPseudo<"aeb", 0xED0A, any_fadd, FP32, z_load, 4>;
434+
defm ADB : BinaryRXEAndPseudo<"adb", 0xED1A, any_fadd, FP64, z_load, 8>;
435435
}
436436

437437
// Subtraction.
@@ -441,8 +441,8 @@ let Uses = [FPC], mayRaiseFPException = 1,
441441
def SDBR : BinaryRRE<"sdbr", 0xB31B, any_fsub, FP64, FP64>;
442442
def SXBR : BinaryRRE<"sxbr", 0xB34B, any_fsub, FP128, FP128>;
443443

444-
defm SEB : BinaryRXEAndPseudo<"seb", 0xED0B, any_fsub, FP32, load, 4>;
445-
defm SDB : BinaryRXEAndPseudo<"sdb", 0xED1B, any_fsub, FP64, load, 8>;
444+
defm SEB : BinaryRXEAndPseudo<"seb", 0xED0B, any_fsub, FP32, z_load, 4>;
445+
defm SDB : BinaryRXEAndPseudo<"sdb", 0xED1B, any_fsub, FP64, z_load, 8>;
446446
}
447447

448448
// Multiplication.
@@ -452,8 +452,8 @@ let Uses = [FPC], mayRaiseFPException = 1 in {
452452
def MDBR : BinaryRRE<"mdbr", 0xB31C, any_fmul, FP64, FP64>;
453453
def MXBR : BinaryRRE<"mxbr", 0xB34C, any_fmul, FP128, FP128>;
454454
}
455-
defm MEEB : BinaryRXEAndPseudo<"meeb", 0xED17, any_fmul, FP32, load, 4>;
456-
defm MDB : BinaryRXEAndPseudo<"mdb", 0xED1C, any_fmul, FP64, load, 8>;
455+
defm MEEB : BinaryRXEAndPseudo<"meeb", 0xED17, any_fmul, FP32, z_load, 4>;
456+
defm MDB : BinaryRXEAndPseudo<"mdb", 0xED1C, any_fmul, FP64, z_load, 8>;
457457
}
458458

459459
// f64 multiplication of two FP32 registers.
@@ -466,7 +466,7 @@ def : Pat<(any_fmul (f64 (any_fpextend FP32:$src1)),
466466

467467
// f64 multiplication of an FP32 register and an f32 memory.
468468
let Uses = [FPC], mayRaiseFPException = 1 in
469-
def MDEB : BinaryRXE<"mdeb", 0xED0C, null_frag, FP64, load, 4>;
469+
def MDEB : BinaryRXE<"mdeb", 0xED0C, null_frag, FP64, z_load, 4>;
470470
def : Pat<(any_fmul (f64 (any_fpextend FP32:$src1)),
471471
(f64 (any_extloadf32 bdxaddr12only:$addr))),
472472
(MDEB (INSERT_SUBREG (f64 (IMPLICIT_DEF)), FP32:$src1, subreg_h32),
@@ -483,7 +483,7 @@ let Predicates = [FeatureNoVectorEnhancements1] in
483483

484484
// f128 multiplication of an FP64 register and an f64 memory.
485485
let Uses = [FPC], mayRaiseFPException = 1 in
486-
def MXDB : BinaryRXE<"mxdb", 0xED07, null_frag, FP128, load, 8>;
486+
def MXDB : BinaryRXE<"mxdb", 0xED07, null_frag, FP128, z_load, 8>;
487487
let Predicates = [FeatureNoVectorEnhancements1] in
488488
def : Pat<(any_fmul (f128 (any_fpextend FP64:$src1)),
489489
(f128 (any_extloadf64 bdxaddr12only:$addr))),
@@ -495,17 +495,17 @@ let Uses = [FPC], mayRaiseFPException = 1 in {
495495
def MAEBR : TernaryRRD<"maebr", 0xB30E, z_any_fma, FP32, FP32>;
496496
def MADBR : TernaryRRD<"madbr", 0xB31E, z_any_fma, FP64, FP64>;
497497

498-
defm MAEB : TernaryRXFAndPseudo<"maeb", 0xED0E, z_any_fma, FP32, FP32, load, 4>;
499-
defm MADB : TernaryRXFAndPseudo<"madb", 0xED1E, z_any_fma, FP64, FP64, load, 8>;
498+
defm MAEB : TernaryRXFAndPseudo<"maeb", 0xED0E, z_any_fma, FP32, FP32, z_load, 4>;
499+
defm MADB : TernaryRXFAndPseudo<"madb", 0xED1E, z_any_fma, FP64, FP64, z_load, 8>;
500500
}
501501

502502
// Fused multiply-subtract.
503503
let Uses = [FPC], mayRaiseFPException = 1 in {
504504
def MSEBR : TernaryRRD<"msebr", 0xB30F, z_any_fms, FP32, FP32>;
505505
def MSDBR : TernaryRRD<"msdbr", 0xB31F, z_any_fms, FP64, FP64>;
506506

507-
defm MSEB : TernaryRXFAndPseudo<"mseb", 0xED0F, z_any_fms, FP32, FP32, load, 4>;
508-
defm MSDB : TernaryRXFAndPseudo<"msdb", 0xED1F, z_any_fms, FP64, FP64, load, 8>;
507+
defm MSEB : TernaryRXFAndPseudo<"mseb", 0xED0F, z_any_fms, FP32, FP32, z_load, 4>;
508+
defm MSDB : TernaryRXFAndPseudo<"msdb", 0xED1F, z_any_fms, FP64, FP64, z_load, 8>;
509509
}
510510

511511
// Division.
@@ -514,8 +514,8 @@ let Uses = [FPC], mayRaiseFPException = 1 in {
514514
def DDBR : BinaryRRE<"ddbr", 0xB31D, any_fdiv, FP64, FP64>;
515515
def DXBR : BinaryRRE<"dxbr", 0xB34D, any_fdiv, FP128, FP128>;
516516

517-
defm DEB : BinaryRXEAndPseudo<"deb", 0xED0D, any_fdiv, FP32, load, 4>;
518-
defm DDB : BinaryRXEAndPseudo<"ddb", 0xED1D, any_fdiv, FP64, load, 8>;
517+
defm DEB : BinaryRXEAndPseudo<"deb", 0xED0D, any_fdiv, FP32, z_load, 4>;
518+
defm DDB : BinaryRXEAndPseudo<"ddb", 0xED1D, any_fdiv, FP64, z_load, 8>;
519519
}
520520

521521
// Divide to integer.
@@ -533,15 +533,15 @@ let Uses = [FPC], mayRaiseFPException = 1, Defs = [CC], CCValues = 0xF in {
533533
def CDBR : CompareRRE<"cdbr", 0xB319, z_any_fcmp, FP64, FP64>;
534534
def CXBR : CompareRRE<"cxbr", 0xB349, z_any_fcmp, FP128, FP128>;
535535

536-
def CEB : CompareRXE<"ceb", 0xED09, z_any_fcmp, FP32, load, 4>;
537-
def CDB : CompareRXE<"cdb", 0xED19, z_any_fcmp, FP64, load, 8>;
536+
def CEB : CompareRXE<"ceb", 0xED09, z_any_fcmp, FP32, z_load, 4>;
537+
def CDB : CompareRXE<"cdb", 0xED19, z_any_fcmp, FP64, z_load, 8>;
538538

539539
def KEBR : CompareRRE<"kebr", 0xB308, z_strict_fcmps, FP32, FP32>;
540540
def KDBR : CompareRRE<"kdbr", 0xB318, z_strict_fcmps, FP64, FP64>;
541541
def KXBR : CompareRRE<"kxbr", 0xB348, z_strict_fcmps, FP128, FP128>;
542542

543-
def KEB : CompareRXE<"keb", 0xED08, z_strict_fcmps, FP32, load, 4>;
544-
def KDB : CompareRXE<"kdb", 0xED18, z_strict_fcmps, FP64, load, 8>;
543+
def KEB : CompareRXE<"keb", 0xED08, z_strict_fcmps, FP32, z_load, 4>;
544+
def KDB : CompareRXE<"kdb", 0xED18, z_strict_fcmps, FP64, z_load, 8>;
545545
}
546546

547547
// Test Data Class.

llvm/lib/Target/SystemZ/SystemZInstrFormats.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3777,7 +3777,7 @@ class BinarySI<string mnemonic, bits<8> opcode, SDPatternOperator operator,
37773777
Operand imm, AddressingMode mode = bdaddr12only>
37783778
: InstSI<opcode, (outs), (ins (mode $B1, $D1):$BD1, imm:$I2),
37793779
mnemonic#"\t$BD1, $I2",
3780-
[(store (operator (load mode:$BD1), imm:$I2), mode:$BD1)]> {
3780+
[(store (operator (z_load mode:$BD1), imm:$I2), mode:$BD1)]> {
37813781
let mayLoad = 1;
37823782
let mayStore = 1;
37833783
}
@@ -3786,7 +3786,7 @@ class BinarySIY<string mnemonic, bits<16> opcode, SDPatternOperator operator,
37863786
Operand imm, AddressingMode mode = bdaddr20only>
37873787
: InstSIY<opcode, (outs), (ins (mode $B1, $D1):$BD1, imm:$I2),
37883788
mnemonic#"\t$BD1, $I2",
3789-
[(store (operator (load mode:$BD1), imm:$I2), mode:$BD1)]> {
3789+
[(store (operator (z_load mode:$BD1), imm:$I2), mode:$BD1)]> {
37903790
let mayLoad = 1;
37913791
let mayStore = 1;
37923792
}

0 commit comments

Comments
 (0)