[LLVMbugs] [Bug 21377] clang hangs on valid code at -Os and above on x86_64-linux-gnu

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Oct 25 00:44:34 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=21377

David Majnemer <david.majnemer at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |david.majnemer at gmail.com
         Resolution|---                         |FIXED
           Assignee|unassignedclangbugs at nondot. |david.majnemer at gmail.com
                   |org                         |

--- Comment #1 from David Majnemer <david.majnemer at gmail.com> ---
InstCombine is fighting with itself.
reduced IR:
; ModuleID = 'bugpoint-reduced-simplified.bc'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@a = external global i32, align 4
@b = external global i32, align 4

; Function Attrs: nounwind
define void @main() #0 {
entry:
  br label %while.cond.i

while.cond.i:                                     ; preds = %while.end.i,
%entry
  %g.0.i = phi i64 [ 0, %entry ], [ %phitmp5.i, %while.end.i ]
  br i1 undef, label %fn2.exit, label %while.body.i

while.body.i:                                     ; preds = %while.cond.i
  %0 = load i32* @b, align 4
  %conv.i = zext i32 %0 to i64
  %phitmp3.i = or i64 %g.0.i, %conv.i
  br label %while.cond3.i

while.cond3.i:                                    ; preds = %while.cond3.i,
%while.body.i
  %g.1.i = phi i64 [ %phitmp3.i, %while.body.i ], [ 0, %while.cond3.i ]
  br i1 undef, label %while.end.i, label %while.cond3.i

while.end.i:                                      ; preds = %while.cond3.i
  %1 = load i32* @a, align 4
  %conv.i.i = sext i32 %1 to i64
  %or7.i = or i64 %g.1.i, %conv.i.i
  %phitmp5.i = and i64 %or7.i, 4294967295
  br label %while.cond.i

fn2.exit:                                         ; preds = %while.cond.i
  ret void
}

attributes #0 = { nounwind "less-precise-fpmad"="false"
"no-frame-pointer-elim"="false" "no-infs-fp-math"="false"
"no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8"
"unsafe-fp-math"="false" "use-soft-float"="false" }

!llvm.ident = !{!0}

!0 = metadata !{metadata !"clang version 3.6.0 "}

-- 
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/20141025/365d1418/attachment.html>


More information about the llvm-bugs mailing list