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

            Bug ID: 32440
           Summary: Assert failed in Reassociate (NumAddedValues > 1 &&
                    "Each occurrence should contribute a value")
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Reproducer: run opt -reassociate on


target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define i32 @f(i8 %a, i32 %b, i32* %c) {
entry:
  %tmp = shl i32 1, 1
  %tmp1 = add i32 %tmp, 187
  br label %bb0

bb0:
  %tmp2 = sext i8 %a to i32
  %tmp3 = sub i32 %tmp1, %tmp2
  %tmp4 = add i32 %tmp, %tmp3
  %tmp5 = sub i32 %b, %tmp4
  ret i32 %tmp5
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to