1 ; RUN: llc < %s -march=x86-64 -enable-unsafe-fp-math | FileCheck %s
3 define double @exact(double %x) {
4 ; Exact division by a constant converted to multiplication.
7 %div = fdiv double %x, 2.0
11 define double @inexact(double %x) {
12 ; Inexact division by a constant converted to multiplication.
15 %div = fdiv double %x, 0x41DFFFFFFFC00000
19 define double @funky(double %x) {
20 ; No conversion to multiplication if too funky.
23 %div = fdiv double %x, 0.0
27 define double @denormal1(double %x) {
28 ; Don't generate multiplication by a denormal.
31 %div = fdiv double %x, 0x7FD0000000000001
35 define double @denormal2(double %x) {
36 ; Don't generate multiplication by a denormal.
39 %div = fdiv double %x, 0x7FEFFFFFFFFFFFFF