llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[X86] Inefficient legalization of sadd.sat with constant operand

Open nikic opened this issue 3 years ago • 2 comments

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

nikic avatar Jun 19 '23 10:06 nikic

@llvm/issue-subscribers-backend-x86

llvmbot avatar Jun 19 '23 10:06 llvmbot

Fixed by https://reviews.llvm.org/D153575 :)

dc03 avatar Jun 23 '23 08:06 dc03