[PATCH] D122836: [SimplifyLibCalls] Fold more memchr calls

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 13:19:35 PDT 2022


xbolva00 added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/memchr-2.ll:108
 
 ; Fold memchr(a12345, 259, n) to n < 4 ? null : a12345 + 3
 ; to verify the constant 259 is converted to unsigned char (yielding 3).
----------------
But IR says N < 3

And gep is 2, not 3.

Confusing.


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

https://reviews.llvm.org/D122836



More information about the llvm-commits mailing list