[PATCH] D75173: [Transform][MemCpyOpt] Add missing DebugLoc to %tmpbitcast
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 06:40:25 PST 2020
Pierre-vh added a comment.
In D75173#1897944 <https://reviews.llvm.org/D75173#1897944>, @vsk wrote:
> I’m not sure I understand why two run lines are needed, and neither are what I’d expect. The test has nothing to do with instcombine afaict, and running debugify /after/ memcpyopt is too late (that won’t test anything, as the real pass has already finished before we try attaching debug metadata).
>
> Istm you just need one run line: opt -debugify -memcpyopt -check-debugify
You are right, I just misunderstood how opt worked (I didn't know the passes were run in order of appearance).
Would this better?
; RUN: opt -instcombine -debugify -memcpyopt -check-debugify -S < %s 2>&1 | FileCheck %s
; CHECK: CheckModuleDebugify: PASS
; CHECK-LABEL: define {{.*}} @_Z3bar3Foo
; CHECK: [[target:%.*]] = load i8*, i8** bitcast (%struct.Foo** @a to i8**), align 8, !dbg
; CHECK: %tmpcast = bitcast i8* [[target]] to %struct.Foo*, !dbg
Note that I need `-instcombine` or else the test does not pass.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75173/new/
https://reviews.llvm.org/D75173
More information about the llvm-commits
mailing list