llvm.org GIT mirror llvm / 5a32446
{DAGCombiner] Fold (rot x, 0) -> x git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307184 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 2 years ago
2 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
52725272 SDValue N1 = N->getOperand(1);
52735273 EVT VT = N->getValueType(0);
52745274
5275 // fold (rot x, 0) -> x
5276 if (isNullConstantOrNullSplatConstant(N1))
5277 return N0;
5278
52755279 // fold (rot* x, (trunc (and y, c))) -> (rot* x, (and (trunc y), (trunc c))).
52765280 if (N1.getOpcode() == ISD::TRUNCATE &&
52775281 N1.getOperand(0).getOpcode() == ISD::AND) {
5858 define <4 x i32> @combine_vec_rot_rot_splat_zero(<4 x i32> %x) {
5959 ; XOP-LABEL: combine_vec_rot_rot_splat_zero:
6060 ; XOP: # BB#0:
61 ; XOP-NEXT: vprotd $0, %xmm0, %xmm0
6261 ; XOP-NEXT: retq
6362 ;
6463 ; AVX512-LABEL: combine_vec_rot_rot_splat_zero: