search for: max4

Displaying 3 results from an estimated 3 matches for "max4".

Did you mean: max
2005 Jun 28
1
Net2Phone equipment and different VOIP providers
Hello we are a small call center with only 8 lines we use max4 and the 2-2 port gateways from net2phone . There equipment is good but we are getting hit by lower cost competition. We need to be able to compete. We have a couple of providers who are 50% less in some cases even more. So it makes sense that we would like to be able to compete . Since we have spen...
2016 Nov 07
5
should we have IR intrinsics for integer min/max?
...= select i1 %cmp, i32 0, i32 %sub ret i32 %sel } ; ret = (x-y) > 0 ? x-y : 0 define i32 @max3(i32 %x, i32 %y) { %sub = sub nsw i32 %x, %y %cmp = icmp sgt i32 %sub, 0 ; canonicalize cmp+sel - looks even more like a max? %sel = select i1 %cmp, i32 %sub, i32 0 ret i32 %sel } define i32 @max4(i32 %x, i32 %y) { %sub = sub nsw i32 %x, %y %max = llvm.smax.i32(i32 %sub, i32 0) ; this intrinsic doesn't exist today ret i32 %max } FWIW, InstCombine doesn't canonicalize any of the first 3 options currently. Codegen suffers because of that (depending on the target machine and dat...
2016 Nov 08
2
should we have IR intrinsics for integer min/max?
...parison of (x-y) against zero likely makes it easier for > computing known bits to simply the answer (you only need to compute the > sign bit). > 3. The constant of the select, 0, is the second argument (which seems to > reflect our general canonical choice). > > > define i32 @max4(i32 %x, i32 %y) { > %sub = sub nsw i32 %x, %y > %max = llvm.smax.i32(i32 %sub, i32 0) ; this intrinsic doesn't exist > today > ret i32 %max > } > > I don't currently see the need for a new intrinsic. > > > FWIW, InstCombine doesn't canonicalize any of...