mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-02 00:42:52 +01:00
5f6f8101d5
integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
16 lines
363 B
LLVM
16 lines
363 B
LLVM
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 0.0 | count 1
|
|
|
|
declare double @abs(double)
|
|
|
|
define double @test(double %X) {
|
|
%Y = fadd double %X, 0.0 ;; Should be a single add x, 0.0
|
|
%Z = fadd double %Y, 0.0
|
|
ret double %Z
|
|
}
|
|
|
|
define double @test1(double %X) {
|
|
%Y = call double @abs(double %X)
|
|
%Z = fadd double %Y, 0.0
|
|
ret double %Z
|
|
}
|