[PATCH] D64859: [InstCombine] strncmp(x,y,strlen(x|y)+1) -> strcmp(x,y)

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 04:38:15 PDT 2019


xbolva00 marked an inline comment as done.
xbolva00 added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:391
+  } else {
+    // strncmp(x,y,strlen(x|y)+1) -> strcmp(x,y)
+    Value *Call;
----------------
Maybe I should extract this matching code for "strlen(x)+ 1" to helper static function now? Or later in followup folds?



Repository:
  rL LLVM

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

https://reviews.llvm.org/D64859





More information about the llvm-commits mailing list