[llvm-bugs] [Bug 46267] New: opt -speculative-execution moves dbg.value(%0 before definition of %0
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 10 00:55:41 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46267
Bug ID: 46267
Summary: opt -speculative-execution moves dbg.value(%0 before
definition of %0
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: mikael.holmen at ericsson.com
CC: llvm-bugs at lists.llvm.org
Created attachment 23595
--> https://bugs.llvm.org/attachment.cgi?id=23595&action=edit
bbi-43737.ll reproducer
Repriduce with:
opt -speculative-execution -S -o - bbi-43737.ll
Input:
define void @f() {
entry:
br i1 undef, label %land.rhs, label %land.end
land.rhs: ; preds = %entry
%0 = load i16, i16* undef, align 1
call void @llvm.dbg.value(metadata i16 %0, metadata !9, metadata
!DIExpression()), !dbg !10
br label %land.end
land.end: ; preds = %land.rhs, %entry
ret void
}
Output:
define dso_local void @f() {
entry:
call void @llvm.dbg.value(metadata i16 %0, metadata !6, metadata
!DIExpression()), !dbg !10
br i1 undef, label %land.rhs, label %land.end
land.rhs: ; preds = %entry
%0 = load i16, i16* undef, align 1
br label %land.end
land.end: ; preds = %land.rhs, %entry
ret void
}
So the dbg.value is hoisted to the entry block, before the definition of the
value it uses.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200610/e6cd3e13/attachment.html>
More information about the llvm-bugs
mailing list