similar to: [LLVMdev] a question about constant fold for fdiv

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] a question about constant fold for fdiv"

2007 Mar 22
0
[LLVMdev] a question about constant fold for fdiv
On Thu, 2007-03-22 at 15:50 -0700, leo han wrote: > Hello, I have a question about the constant folding for fdiv instructions. > For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I > think this should be nan. Can anyone tell me why it is not nan? I think the specification says that it is "undefined" so any value will do. inf is just as undefined
2007 Mar 22
2
[LLVMdev] a question about constant fold for fdiv
Reid Spencer wrote: > On Thu, 2007-03-22 at 15:50 -0700, leo han wrote: > >> Hello, I have a question about the constant folding for fdiv instructions. >> For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I >> think this should be nan. Can anyone tell me why it is not nan? >> > > I think the specification says that it is
2007 Mar 22
0
[LLVMdev] a question about constant fold for fdiv
Jeff Cohen wrote: > Reid Spencer wrote: >> On Thu, 2007-03-22 at 15:50 -0700, leo han wrote: >> >>> Hello, I have a question about the constant folding for fdiv instructions. >>> For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I >>> think this should be nan. Can anyone tell me why it is not nan? >>>
2007 Apr 29
1
100 users - voip lan security and qos ?
i have a customer that needs to plug the phones into the pc's using the pass-through rj45 available on most sip phones the question they are asking me is how to keep the data network separate from / secure from the voip network i understand they can set up vlans but i am hazy on a few details 1 since the phones are plugged into the pc's how will the phones be segmented into their own
2007 Mar 22
2
[LLVMdev] a question about constant fold for fdiv
Jeff Cohen wrote: > Jeff Cohen wrote: >> Reid Spencer wrote: >>> On Thu, 2007-03-22 at 15:50 -0700, leo han wrote: >>> >>>> Hello, I have a question about the constant folding for fdiv instructions. >>>> For the instruction "fdiv double 0.0, 0.0", the folded result is inf. I >>>> think this should be nan. Can anyone tell
2013 Aug 08
0
[LLVMdev] Convert fdiv - X/Y -> X*1/Y
On 08.08.2013, at 18:25, Chad Rosier <chad.rosier at gmail.com> wrote: > I would like to transform X/Y -> X*1/Y. Specifically, I would like to convert: > > define void @t1a(double %a, double %b, double %d) { > entry: > %div = fdiv fast double %a, %d > %div1 = fdiv fast double %b, %d > %call = tail call i32 @foo(double %div, double %div1) > ret void >
2013 Aug 08
0
[LLVMdev] Convert fdiv - X/Y -> X*1/Y
I did few transformation in Instruction *InstCombiner::visitFDiv() in an attempt to remove some divs. I may miss this case. If you need to implement this rule, it is better done in Instcombine than in DAG combine. Doing such xform early expose the redundancy of 1/y, which have positive impact to neighboring code, while DAG combine is bit blind. You should be very careful, reciprocal is very
2013 Aug 08
0
[LLVMdev] Convert fdiv - X/Y -> X*1/Y
Hi Chad, This is a great transform to do, but you’re right that it’s only safe under fast-math. This is particularly interesting when the original divisor is a constant so you can materialize the reciprocal at compile-time. You’re right that in either case, this optimization should only kick in when there is more than one divide instruction that will be changed to a mul. I don’t have a strong
2013 Aug 08
0
[LLVMdev] Convert fdiv - X/Y -> X*1/Y
I believe we were under the impression that InstCombine, as a canonicalized/optimizer, should not increase code size but only reduce it. Minor aside, but you don't need all of fast-math for the IR, just the "arcp" flag, which allows for replacement of division with reciprocal-multiply. On Aug 8, 2013, at 10:21 AM, Shuxin Yang <shuxin.llvm at gmail.com> wrote: > I remember
2017 Jun 22
3
Semantics of fdiv division by zero
Hey guys, I am wondering what the semantics for fdiv is, if the denominator is zero. For sdiv, the language reference specifies that this is undefined behavior. For fdiv, the language reference says nothing (hence, I assume that it is defined somehow). So how is it defined? Does it follow IEEE-754 definition, i.e., +Inf if nominator is > 0, -Inf if nominator is < 0, otherwise NaN?
2013 Aug 08
3
[LLVMdev] Convert fdiv - X/Y -> X*1/Y
I remember why I didn't implement this rule in Instcombine. It add one instruction. So, this xform should be driven by a redundancy eliminator if you care code size. On 8/8/13 10:13 AM, Shuxin Yang wrote: > I did few transformation in Instruction *InstCombiner::visitFDiv() in > an attempt to remove some divs. > I may miss this case. If you need to implement this rule, it is >
2013 Aug 08
2
[LLVMdev] Convert fdiv - X/Y -> X*1/Y
On Aug 8, 2013, at 9:56 AM, Jim Grosbach <grosbach at apple.com> wrote: > Hi Chad, > > This is a great transform to do, but you’re right that it’s only safe under fast-math. This is particularly interesting when the original divisor is a constant so you can materialize the reciprocal at compile-time. You’re right that in either case, this optimization should only kick in when
2018 Sep 25
2
Unsafe floating point operation (FDiv & FRem) in LoopVectorizer
Hi, Consider the following test case: int foo(float *A, float *B, float *C, int len, int VSMALL) { for (int i = 0; i < len; i++) if (C[i] > VSMALL) A[i] = B[i] / C[i]; } In this test the div operation is conditional but llvm is generating unconditional div for this case: vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [
2013 Aug 08
13
[LLVMdev] Convert fdiv - X/Y -> X*1/Y
I would like to transform X/Y -> X*1/Y. Specifically, I would like to convert: define void @t1a(double %a, double %b, double %d) { entry: %div = fdiv fast double %a, %d %div1 = fdiv fast double %b, %d %call = tail call i32 @foo(double %div, double %div1) ret void } to: define void @t1b(double %a, double %b, double %d) { entry: %div = fdiv fast double 1.000000e+00, %d %mul = fmul
2007 May 05
1
rsync --delete-existing needed
Hi, I made the mistake of doing an rsync of a directory into the wrong destination, so that the destination became a mix of two directories of unrelated files. Top unravel the mess, I could need something like a --delete-existing option. The semantics would be to delete at the destination ONLY those files that exists at the source. I tried to concoct a combination of options that would do
2013 Aug 08
0
[LLVMdev] Convert fdiv - X/Y -> X*1/Y
Seems incorrect but I forget the IEEE fp rules. What if both x and y are infinity? in that case x/y = NAN but you transformation will yield 0 as the result. On 08/08/2013 09:25 AM, Chad Rosier wrote: > I would like to transform X/Y -> X*1/Y. Specifically, I would like to > convert: > > define void @t1a(double %a, double %b, double %d) { > entry: > %div = fdiv fast
2014 Aug 27
3
[LLVMdev] Bug 16257 - fmul of undef ConstantExpr not folded to undef
Duncan, > Hi Oleg, > >> >> /This is either a mistake, or a decision that in LLVM IR snans >> are always >> considered to be signalling. / >> Yes, this seems to be an agreement to treat "undef" as a SNaN for >> "fdiv". > > "undef" is whatever bit pattern you want it to be, i.e. the compiler > can assume it is any
2014 Aug 27
2
[LLVMdev] Bug 16257 - fmul of undef ConstantExpr not folded to undef
Hi Duncan, Thank you a lot for your time to provide that great and informative explanation. Now the "undef" logic makes much more sense for me. >> /You are wrong to say that "div undef, %X" is folded to "undef" by InstructionSimplify, it is folded to zero./ My mistake. I meant to say "*f****div* undef, %X" is folded to "undef" (not
2007 Mar 22
0
[LLVMdev] a question about constant fold for fdiv
Jeff Cohen wrote: > > The standard apparently doesn't explicitly handle 0/0, but the > position of the IEEE appears to be that it should yield a NaN of the > appropriate sign. See > http://standards.ieee.org/reading/ieee/interp/754-1985.html OK, it does explicitly handle it. My reading comprehension seems to be lacking right now :(
2013 Aug 08
0
[LLVMdev] Convert fdiv - X/Y -> X*1/Y
On Thu, Aug 8, 2013 at 1:56 PM, Mark Lacey <mark.lacey at apple.com> wrote: > > On Aug 8, 2013, at 9:56 AM, Jim Grosbach <grosbach at apple.com> wrote: > > Hi Chad, > > This is a great transform to do, but you’re right that it’s only safe > under fast-math. This is particularly interesting when the original divisor > is a constant so you can materialize the