[llvm-bugs] [Bug 49509] New: [PowerPC] Infinite loop in PeepholeCROps

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 10 05:13:44 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49509

            Bug ID: 49509
           Summary: [PowerPC] Infinite loop in PeepholeCROps
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedbugs at nondot.org
          Reporter: nikita.ppv at gmail.com
                CC: llvm-bugs at lists.llvm.org, nemanja.i.ibm at gmail.com

; RUN: llc -O2 < %s

target datalayout = "E-m:e-p:32:32-i64:64-n32"
target triple = "powerpc-unknown-linux-gnu"

define void @test() {
bb:
  br i1 undef, label %bb2, label %bb1

bb2:                                              ; preds = %bb
  %i = select i1 undef, i64 0, i64 72057594037927936
  store i64 %i, i64* undef, align 8
  ret void

bb1:                                              ; preds = %bb
  %i50 = load i8, i8* undef, align 8
  %i52 = load i128, i128* null, align 8
  %i62 = icmp eq i8 %i50, 0
  br i1 undef, label %bb66, label %bb64

bb64:                                             ; preds = %bb63
  ret void

bb66:                                             ; preds = %bb63
  %i67 = lshr i128 -1, 0
  %i68 = xor i128 %i52, -1
  %i69 = add i128 0, %i68
  %i70 = and i128 %i67, %i69
  %i71 = icmp eq i128 %i70, 0
  %i74 = select i1 %i62, i64 0, i64 72057594037927936
  %i75 = select i1 %i71, i64 144115188075855872, i64 %i74
  store i64 %i75, i64* undef, align 8
  ret void
}

This enters an infinite combine loop inside PPCDAGToDAGISel::PeepholeCROps().

-- 
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/20210310/005b81b6/attachment.html>


More information about the llvm-bugs mailing list