llvm-6502/test/Transforms/InstCombine/add-sitofp.ll
Dan Gohman a332f17c8c Generalize the new code in instcombine's ComputeNumSignBits for handling
and/or to handle more cases (such as this add-sitofp.ll testcase), and
port it to selectiondag's ComputeNumSignBits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51469 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-23 02:28:01 +00:00

10 lines
232 B
LLVM

; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {add i32}
define double @x(i32 %a, i32 %b) nounwind {
%m = lshr i32 %a, 24
%n = and i32 %m, %b
%o = sitofp i32 %n to double
%p = add double %o, 1.0
ret double %p
}