Issue 202467
Summary Missed optimization: `scmp(sext(x))` can be folded to `scmp(x)`
Labels new issue
Assignees
Reporter ruriww
    https://godbolt.org/z/TT1e3P1h8

Final IR:
```llvm
  %_12 = tail call i32 @memcmp(ptr noundef nonnull dereferenceable(32) %x, ptr noundef nonnull dereferenceable(32) %y, i64 32)
 %0 = sext i32 %_12 to i64
  %_0 = tail call i8 @llvm.scmp.i8.i64(i64 %0, i64 0)
  ret i8 %_0
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to