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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 00:36:51 PDT 2022


nikic added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/strcall-no-nul.ll:142
+;
+; XFAIL-CHECK-NEXT: ret i8*, null
+  %p5 = getelementptr [5 x i8], [5 x i8]* @a5, i32 0, i32 5
----------------
msebor wrote:
> nikic wrote:
> > This check line doesn't make a lot of sense ... the syntax is incorrect (and the incorrect syntax is repeated in the cases below) and the ret wouldn't make sense here anyway (because strlen returns an integer not a pointer). The TODO also seems outdated, as this already folds to 0.
> I've fixed the `strlen` typo.
> 
> I hand-wrote all these lines and I realize not all of them are entirely correct.  My main goal was to more prominently mark up the expected failures, but I was also hoping that `llvm-lit` would pick them up somehow and indicate when there are expected failures in the test.  I've removed the rest of the `XFAIL-` lines from the final commit but, for future reference, is there a way to do what I want?  (I couldn't find an example in the test suite that I didn't add myself.)
It's possible to mark the entire test as XFAIL using `XFAIL: *`, but I don't think XFAIL interacts with FileCheck in any way.

General convention is to check for current codegen and put a TODO/FIXME if it's currently incorrect/suboptimal.


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