<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [CFGOpt] Instruction does not dominate all uses!"
href="https://bugs.llvm.org/show_bug.cgi?id=49195">49195</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[CFGOpt] Instruction does not dominate all uses!
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>paulsson@linux.vnet.ibm.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24530" name="attach_24530" title="reduced testcase">attachment 24530</a> <a href="attachment.cgi?id=24530&action=edit" title="reduced testcase">[details]</a></span>
reduced testcase
clang -O3 -march=z10 crash10_aftercreduce.c -o a.out -w -mllvm
-bonus-inst-threshold=2
Instruction does not dominate all uses!
%3 = load i32, i32* @a, align 4
store i32 %3, i32* %1, align 4, !tbaa !2
Instruction does not dominate all uses!
%5 = load i32, i32* @a, align 4
store i32 %5, i32* %1, align 4, !tbaa !2
Instruction does not dominate all uses!
%7 = load i32, i32* @a, align 4
store i32 %7, i32* %1, align 4, !tbaa !2
Instruction does not dominate all uses!
%9 = load i32, i32* @a, align 4
store i32 %9, i32* %1, align 4, !tbaa !2
*** IR Dump After Combine redundant instructions ***
; Function Attrs: nofree noinline norecurse nounwind
define dso_local void @h() local_unnamed_addr #0 {
entry:
%0 = load i32, i32* @e, align 4, !tbaa !2
%tobool.not3 = icmp eq i32 %0, 0
br i1 %tobool.not3, label %for.end, label %for.body.lr.ph
for.body.lr.ph: ; preds = %entry
%1 = load i32*, i32** @d, align 8
br label %for.body
for.body: ; preds = %for.body.lr.ph,
%if.then
%2 = load i32, i32* @a, align 4, !tbaa !2
%tobool1.not = icmp eq i32 %2, 0
br i1 %tobool1.not, label %for.end.loopexit, label %if.then
if.then: ; preds = %for.body
store i32 %2, i32* %1, align 4, !tbaa !2
%3 = load i32, i32* @e, align 4, !tbaa !2
%tobool.not = icmp eq i32 %3, 0
br i1 %tobool.not, label %for.end.loopexit, label %for.body, !llvm.loop !6
for.end.loopexit: ; preds = %for.body, %if.then
br label %for.end
for.end: ; preds = %for.end.loopexit,
%entry
ret void
}
*** IR Dump After Simplify the CFG ***
; Function Attrs: nofree noinline norecurse nounwind
define dso_local void @h() local_unnamed_addr #0 {
entry:
%0 = load i32, i32* @e, align 4, !tbaa !2
%tobool.not3 = icmp eq i32 %0, 0
%1 = load i32*, i32** @d, align 8
%.old = load i32, i32* @a, align 4
%tobool1.not.old = icmp eq i32 %.old, 0
%or.cond5 = or i1 %tobool.not3, %tobool1.not.old
br i1 %or.cond5, label %for.end, label %if.then
if.then: ; preds = %entry, %if.then
store i32 %3, i32* %1, align 4, !tbaa !2
%2 = load i32, i32* @e, align 4, !tbaa !2
%tobool.not = icmp eq i32 %2, 0
%3 = load i32, i32* @a, align 4
%tobool1.not = icmp eq i32 %3, 0
%or.cond = or i1 %tobool.not, %tobool1.not
br i1 %or.cond, label %for.end, label %if.then, !llvm.loop !6
for.end: ; preds = %if.then, %entry
ret void
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>