On Mar 3, 2010, at 3:20 PM, Chris Lattner wrote:> > On Mar 3, 2010, at 1:53 PM, David Greene wrote: > >>> >>> IMO rounding mode should be explicitly marked on the >>> instruction as well. >> >> That would also be useful for some GPUs where each instruction can specify >> its own rounding mode. > > SSE4 also has this for at least one conversion instruction.As does ARM NEON. Sorta. vcvt normally uses round-to-zero, but it can optionally use the mode specified by the control register instead.
By the way: x * 1 = 1 is one optimisation I never want to see in llvm please. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100304/e2bf0cd7/attachment.html>
> By the way: > x * 1 = 1 > is one optimisation I never want to see in llvm please.Did you mean x * 1 = x, or were you making a joke? (: Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100304/a1ee10f6/attachment.html>
On 03/03/2010 09:25 PM, Paul Davey wrote:> By the way: > x * 1 = 1 > is one optimisation I never want to see in llvm please.What about the well-known simplification log(x) = 10? (Sorry, it's an order-of-magnitude physics joke.) 7x57
sorry forgot to change address :/ Rob: from original post: I would expect the following optimizations, but didn't find them in the code: x + 0 = x x * 0 = 0 x * 1 = 1 x * -1 = -x -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100304/ab3a1b7a/attachment.html>
On Mar 3, 2010, at 11:52 PM, Paul Davey wrote:> sorry forgot to change address :/ > Rob: > > from original post: > > I would expect the following optimizations, but didn't find them in the > code: > x + 0 = x > x * 0 = 0 > x * 1 = 1 > x * -1 = -xTake a look at lib/Analysis/InstructionSimplify.cpp -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100303/c9089edd/attachment.html>