[PATCH] D34642: Restore original intent of memset instcombine test

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 16:57:20 PDT 2017


efriedma added inline comments.


================
Comment at: test/Transforms/InstCombine/memset.ll:14
   %target_p = getelementptr [1024 x i8], [1024 x i8]* %target, i32 0, i32 0
   call void @llvm.memset.p0i8.i32(i8* %target_p, i8 1, i32 0, i32 1, i1 false)
   call void @llvm.memset.p0i8.i32(i8* %target_p, i8 1, i32 1, i32 1, i1 false)
----------------
dneilson wrote:
> efriedma wrote:
> > Your CHECK lines aren't checking that this memset was eliminated.  (Maybe you can do something with CHECK-NEXT?)
> Good point. CHECK-NOT, perhaps?
CHECK-NOT isn't really doing what you want it to here... it doesn't apply to the whole file, just the bit after the last CHECK line.

Hence my suggestion to use CHECK-NEXT: if every check is a CHECK-NEXT, you can verify that there aren't any unexpected instructions in the IR.


https://reviews.llvm.org/D34642





More information about the llvm-commits mailing list