forked from OSchip/llvm-project
[NFC][InstCombine] Negator: add a comment about negating exact arithmentic shift
This commit is contained in:
parent
442cb88f53
commit
47aec80e4a
|
@ -184,6 +184,10 @@ LLVM_NODISCARD Value *Negator::visitImpl(Value *V, unsigned Depth) {
|
|||
}
|
||||
return BO;
|
||||
}
|
||||
// While we could negate exact arithmetic shift:
|
||||
// ashr exact %x, C --> sdiv exact i8 %x, -1<<C
|
||||
// iff C != 0 and C u< bitwidth(%x), we don't want to,
|
||||
// because division is *THAT* much worse than a shift.
|
||||
break;
|
||||
}
|
||||
case Instruction::SExt:
|
||||
|
|
Loading…
Reference in New Issue