mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
[X86] Add NEG to isUseDefConvertible.
We can use the C flag from NEG to detect that the input was zero. Really we could probably use the Z flag too. But C matches what we'd do for usubo 0, X. Haven't found a test case for this due to the usubo formation in CGP. But I verified if I comment out the CGP code this transformation catches some of the same cases. llvm-svn: 365929
This commit is contained in:
parent
7f2a0e6b10
commit
a262a2636b
@ -3374,6 +3374,11 @@ inline static bool isDefConvertible(const MachineInstr &MI, bool &NoSignFlag) {
|
||||
static X86::CondCode isUseDefConvertible(const MachineInstr &MI) {
|
||||
switch (MI.getOpcode()) {
|
||||
default: return X86::COND_INVALID;
|
||||
case X86::NEG8r:
|
||||
case X86::NEG16r:
|
||||
case X86::NEG32r:
|
||||
case X86::NEG64r:
|
||||
return X86::COND_AE;
|
||||
case X86::LZCNT16rr:
|
||||
case X86::LZCNT32rr:
|
||||
case X86::LZCNT64rr:
|
||||
|
Loading…
Reference in New Issue
Block a user