SuccessChanges

Summary

  1. [X86] Remove dyn_casts to ConstantSDNode for operand 1 of (details)
  2. [X86] Use isOneConstant to simplify some code. NFC (details)
  3. [X86] Use APInt::isOneValue and ConstantSDNode::isOne. NFC (details)
  4. [PowerPC] Exploit the rlwinm instructions for "and" with constant (details)
Commit 599d07091002b20be5e2b12b256782e0dd0df998 by craig.topper
[X86] Remove dyn_casts to ConstantSDNode for operand 1 of
X86ISD::VSRLI/VSRAI/VSRLI. Use getConstantOperandVal and APInt
operations.
These nodes should only ever be formed with an i8 TargetConstant so we
don't need to check for it to be a constant. It's also always 8-bits so
we don't need to use APInt compare functions.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit b2f19320dc1ca82acd3939b18c5c73ee8833b735 by craig.topper
[X86] Use isOneConstant to simplify some code. NFC
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 266cd7717c8126213a7560d26da5495053be90c0 by craig.topper
[X86] Use APInt::isOneValue and ConstantSDNode::isOne. NFC
These are implemented slightly more efficiently than comparing to 1 in
the case that the value is more than 64 bits.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 874a8004f93538a0c9b335a7e1e34d80b57ebccd by qshanz
[PowerPC] Exploit the rlwinm instructions for "and" with constant
For now, PowerPC will using several instructions to get the constant and
"and" it with the following case:
define i32 @test1(i32 %a) {
%and = and i32 %a, -2
ret i32 %and
}
However, we could exploit it with the rotate mask instructions.
              MB  ME
+----------------------+
|xxxxxxxxxxx00011111000|
+----------------------+
0         32         64 Notice that, we can only do it if the MB is
larger than 32 and MB <= ME as RLWINM will replace the content of [0 -
32) with [32 - 64) even we didn't rotate it.
Differential Revision: https://reviews.llvm.org/D71829
The file was modifiedllvm/test/CodeGen/PowerPC/popcnt-zext.ll
The file was modifiedllvm/test/CodeGen/PowerPC/and-mask.ll
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h
The file was modifiedllvm/test/CodeGen/PowerPC/opt-cmp-inst-cr0-live.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp