summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/pr32063.ll
Commit message (Collapse)AuthorAgeFilesLines
* [PPC] Fix code generation for bswap(int32) followed by store16Guozhi Wei2017-03-021-0/+16
This patch fixes pr32063. Current code in PPCTargetLowering::PerformDAGCombine can transform bswap store into a single PPCISD::STBRX instruction. but it doesn't consider the case that the operand size of bswap may be larger than store size. When it occurs, we need 2 modifications, 1 For the last operand of PPCISD::STBRX, we should not use DAG.getValueType(N->getOperand(1).getValueType()), instead we should use cast<StoreSDNode>(N)->getMemoryVT(). 2 Before PPCISD::STBRX, we need to shift the original operand of bswap to the right side. Differential Revision: https://reviews.llvm.org/D30362 llvm-svn: 296811
OpenPOWER on IntegriCloud