[llvm] [llvm][InstCombine] Fold signum(x) into scmp(x, 0) (PR #143445)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 11 06:28:09 PDT 2025


AZero13 wrote:

```x86asm
  add edi, edi
  setnz cl
  sbb eax, eax
  or al, cl
  ret```

Is how I'd lower specifically this one, but I don't know if I can get the compiler to do that. 

I'll look into it. 

https://github.com/llvm/llvm-project/pull/143445


More information about the llvm-commits mailing list