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

            Bug ID: 21130
           Summary: gvn badly replaces a call to fptosi
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

; ModuleID = 'plop.ll'
target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128"

define i8 @jit_main() {
EntryBlock:
  %0 = fptosi double 1.560000e+02 to i8
  ret i8 %0
}

opt -S --gvn plop.ll shows:
define i8 @jit_main() {
EntryBlock:
  ret i8 127
}

it should be ret i8 -100.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to