[PATCH] D100165: [GVNHoist] fix a bug where GVNHoist preserves the debug location when it should be dropped

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 12 08:43:02 PDT 2021


aprantl added inline comments.


================
Comment at: llvm/test/Transforms/GVNHoist/hoist_debugloc.ll:1
+; RUN: opt -gvn-hoist %s -S 2>&1 | FileCheck %s
+; CHECK: store i32 1, i32* @{{[a-zA-Z_][a-zA-Z0-9_]*}}, align 4
----------------
Could you add a comment explaining what this test is testing?


================
Comment at: llvm/test/Transforms/GVNHoist/hoist_debugloc.ll:2
+; RUN: opt -gvn-hoist %s -S 2>&1 | FileCheck %s
+; CHECK: store i32 1, i32* @{{[a-zA-Z_][a-zA-Z0-9_]*}}, align 4
+source_filename = "abc.ll"
----------------
This test doesn't actually work for checking that there is no !dbg attachment on the instruction.
You probably want to add something like `{{$}}` at the end.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100165



More information about the llvm-commits mailing list