Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
llvm-doe
llvm-project
Commits
81b2d1d1
Commit
81b2d1d1
authored
Jun 24, 2020
by
Jinsong Ji
Browse files
[NFC][PowerPC] Fix some typos in MachineCombiner comments
parent
3d123e17
Changes
1
Hide whitespace changes
Inline
Side-by-side
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
View file @
81b2d1d1
...
...
@@ -289,12 +289,11 @@ bool PPCInstrInfo::isAssociativeAndCommutative(const MachineInstr &Inst) const {
// Index 0(InfoArrayIdxFMAInst): FMA instruction;
// Index 1(InfoArrayIdxFAddInst): ADD instruction assoaicted with FMA;
// Index 2(InfoArrayIdxFMULInst): MUL instruction assoaicted with FMA;
// Index 3(InfoArrayIdxAddOpIdx): ADD operand index in the FMA operand list;
// Index 4(InfoArrayIdxMULOpIdx): first MUL operand index in the FMA operand
// list;
// Index 3(InfoArrayIdxAddOpIdx): ADD operand index in FMA operands;
// Index 4(InfoArrayIdxMULOpIdx): first MUL operand index in FMA operands;
// second MUL operand index is plus 1.
static
const
uint16_t
FMAOpIdxInfo
[][
5
]
=
{
// FIXME:
a
dd more FMA instructions like XSNMADDADP and so on.
// FIXME:
A
dd more FMA instructions like XSNMADDADP and so on.
{
PPC
::
XSMADDADP
,
PPC
::
XSADDDP
,
PPC
::
XSMULDP
,
1
,
2
},
{
PPC
::
XSMADDASP
,
PPC
::
XSADDSP
,
PPC
::
XSMULSP
,
1
,
2
},
{
PPC
::
XVMADDADP
,
PPC
::
XVADDDP
,
PPC
::
XVMULDP
,
1
,
2
},
...
...
@@ -362,12 +361,12 @@ bool PPCInstrInfo::getFMAPatterns(
return
false
;
// Instruction can be reassociated.
// fast mat
c
h flags may prohibit reassociation.
// fast math flags may prohibit reassociation.
if
(
!
(
Instr
.
getFlag
(
MachineInstr
::
MIFlag
::
FmReassoc
)
&&
Instr
.
getFlag
(
MachineInstr
::
MIFlag
::
FmNsz
)))
return
false
;
// Instruction operands are virtual registers for reassociatin
g
.
// Instruction operands are virtual registers for reassociati
o
n.
if
(
!
IsAllOpsVirtualReg
(
Instr
))
return
false
;
...
...
@@ -544,7 +543,7 @@ void PPCInstrInfo::reassociateFMA(
.
addReg
(
RegY
,
getKillRegState
(
KillY
))
.
addReg
(
RegM31
,
getKillRegState
(
KillM31
))
.
addReg
(
RegM32
,
getKillRegState
(
KillM32
));
//
i
f AddOpIdx is not 1, adjust the order.
//
I
f AddOpIdx is not 1, adjust the order.
if
(
AddOpIdx
!=
1
)
{
AdjustOperandOrder
(
MINewB
,
RegX
,
KillX
,
RegM21
,
KillM21
,
RegM22
,
KillM22
);
AdjustOperandOrder
(
MINewA
,
RegY
,
KillY
,
RegM31
,
KillM31
,
RegM32
,
KillM32
);
...
...
@@ -556,7 +555,7 @@ void PPCInstrInfo::reassociateFMA(
.
addReg
(
NewVRB
,
getKillRegState
(
true
))
.
addReg
(
NewVRA
,
getKillRegState
(
true
));
//
u
pdate flags for new created instructions.
//
U
pdate flags for new
ly
created instructions.
setSpecialOperandAttr
(
*
MINewA
,
IntersectedFlags
);
setSpecialOperandAttr
(
*
MINewB
,
IntersectedFlags
);
setSpecialOperandAttr
(
*
MINewC
,
IntersectedFlags
);
...
...
@@ -596,7 +595,7 @@ void PPCInstrInfo::reassociateFMA(
.
addReg
(
NewVRB
,
getKillRegState
(
true
))
.
addReg
(
NewVRD
,
getKillRegState
(
true
));
//
u
pdate flags for new created instructions.
//
U
pdate flags for new
ly
created instructions.
setSpecialOperandAttr
(
*
MINewA
,
IntersectedFlags
);
setSpecialOperandAttr
(
*
MINewB
,
IntersectedFlags
);
setSpecialOperandAttr
(
*
MINewD
,
IntersectedFlags
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment