Skip to content

Commit f1c8063

Browse files
author
Tony Varghese
committed
Added comments why certain ternary patterns are omitted, fixed the op typo in the comment
1 parent 9aaebd9 commit f1c8063

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

llvm/lib/Target/PowerPC/PPCInstrP10.td

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,11 @@ multiclass XXEvalTernarySelectAnd<ValueType Vt> {
22812281
// The patterns implement xxeval vector select operations where:
22822282
// - A is the selector vector
22832283
// - f(B,C) is the "true" case op on vectors B and C (AND, NOR, EQV, NAND)
2284-
// - B is the "false" case op (vector B)
2284+
// - B is the "false" case operand (vector B)
2285+
//
2286+
// Note: Patterns (A? C : B) and (A? not(C) : B) are not considered
2287+
// for XXEVAL instruction (4 Cycle) as XXSEL (3 cycle) instruction performs
2288+
// better.
22852289
// =============================================================================
22862290
multiclass XXEvalTernarySelectB<ValueType Vt>{
22872291
// Pattern: (A ? AND(B,C) : B) XXEVAL immediate value: 49
@@ -2302,7 +2306,11 @@ multiclass XXEvalTernarySelectB<ValueType Vt>{
23022306
// The patterns implement xxeval vector select operations where:
23032307
// - A is the selector vector
23042308
// - f(B,C) is the "true" case op on vectors B and C (AND, NOR, EQV, NAND)
2305-
// - C is the "false" case op (vector C)
2309+
// - C is the "false" case operand (vector C)
2310+
//
2311+
// Note: Patterns (A? B : C) and (A? not(B) : C) are not considered
2312+
// for XXEVAL instruction (4 Cycle) as XXSEL (3 cycle) instruction performs
2313+
// better.
23062314
// =============================================================================
23072315
multiclass XXEvalTernarySelectC<ValueType Vt>{
23082316
// Pattern: (A ? AND(B,C) : C) XXEVAL immediate value: 81

0 commit comments

Comments
 (0)