llvm-project
llvm-project copied to clipboard
[X86] Inefficient legalization of sadd.sat with constant operand
The current legalization of sadd.sat on X86 is inefficient for the common case where we know the sign of one of the operands (e.g. because it is constant). In that case we only need to check overflow in one direction.
https://llvm.godbolt.org/z/fxzWTqorW
@llvm/issue-subscribers-backend-x86
Fixed by https://reviews.llvm.org/D153575 :)