Skip to content
Snippets Groups Projects
Commit a93607c4 authored by David Green's avatar David Green
Browse files

[AArch64] Remove always true Perfect cost check. NFC

Perfect shuffle costs are always encoded less than 4, and shouldn't
really have a cost more than 3, so it makes no sense to check it when
generating shuffles. The perfect shuffle is likely always better than a
tbl too (although that may depend on whether it is in a loop).
parent 33ab88ef
No related branches found
No related tags found
No related merge requests found
......@@ -10204,10 +10204,7 @@ SDValue AArch64TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
unsigned PFTableIndex = PFIndexes[0] * 9 * 9 * 9 + PFIndexes[1] * 9 * 9 +
PFIndexes[2] * 9 + PFIndexes[3];
unsigned PFEntry = PerfectShuffleTable[PFTableIndex];
unsigned Cost = (PFEntry >> 30);
if (Cost <= 4)
return GeneratePerfectShuffle(PFEntry, V1, V2, DAG, dl);
return GeneratePerfectShuffle(PFEntry, V1, V2, DAG, dl);
}
 
return GenerateTBL(Op, ShuffleMask, DAG);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment