[PATCH] D128364: [InstCombine] Look through more casts when folding memchr and memcmp

Martin Sebor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 09:25:28 PDT 2022


msebor added a comment.

I suspect the Darwin `strtol` behaves differently than on Linux for en empty subject sequence (ie., for `""`).  On Linux `strtol` succeeds and returns zero without changing `errno`.  On Darwin it sets `errno`, which then causes the `convertStrToNumber` utility function to fail.  This is permitted by POSIX but the test assumes the Linux behavior.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128364/new/

https://reviews.llvm.org/D128364



More information about the llvm-commits mailing list