[PATCH] D152492: [SelectionDAG] Do not salvage with vector node

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 08:50:27 PDT 2023


aprantl added a comment.

Code change looks good, but I have some suggestions for the test.



================
Comment at: llvm/test/DebugInfo/X86/dbg-value-no-crash.ll:3
+
+;; Check this won't result in crash.
+define <8 x i32> @foo(ptr %0, <8 x i32> %1, i8 %2, i8 %3) {
----------------
Can you add a comment that this is about salvage debug info in SelectionDAG?


================
Comment at: llvm/test/DebugInfo/X86/dbg-value-no-crash.ll:7
+  %6 = add nsw <8 x i32> %1, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>
+  call void @llvm.dbg.value(metadata <8 x i32> %6, metadata !4, metadata !DIExpression()), !dbg !15
+  %7 = bitcast i8 %2 to <8 x i1>
----------------
A test with no CHECK lines is hard to maintain, since it's unclear what is being tested for. Could you add some positive checks to the output? For example, you could  compile with -stop-before=regalloc and then check for function start followed by a CHECK-NOT: DBG_VALUE


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152492



More information about the llvm-commits mailing list