similar to: FoldItoFPtoI patch

Displaying 20 results from an estimated 50000 matches similar to: "FoldItoFPtoI patch"

2016 Apr 15
2
Integer -> Floating point -> Integer cast optimizations
My understanding is that this checks whether the bit width of the integer *type* fits in the bit width of the mantissa, not the bit width of the integer value. - CL > On Apr 14, 2016, at 6:02 PM, escha at apple.com wrote: > > We already do this to some extent; see this code in InstCombineCasts: > > // fpto{s/u}i({u/s}itofp(X)) --> X or zext(X) or sext(X) or trunc(X) > //
2016 Apr 14
2
Integer -> Floating point -> Integer cast optimizations
I'm saying at the IR level, not the C level. IR makes certain assumptions about the representation of floating point numbers. Nothing to do with C, I only used it as an example. - CL > On Apr 14, 2016, at 4:49 PM, Martin J. O'Riordan <martin.oriordan at movidius.com> wrote: > > I don't think that this is correct. > > | Let's say we have an int x, and we
2016 Apr 07
2
Implementing a proposed InstCombine optimization
Hi, I'm interested in implementing an InstCombine optimization that I discovered and verified with Alive-NJ (with the help of the authors of Alive-NJ). The optimization is described in Alive-NJ format as follows: Name: xor->fsub Pre: isSignBit(C) %x = bitcast %A %y = xor %x, C %z = bitcast %y => %z = fsub -0.0, %A Effectively the optimization targets code that casts a float to an int
2016 Jul 04
2
Path condition propagation
Sure On Mon, Jul 4, 2016, 9:40 AM Carlos Liam <carlos at aarzee.me> wrote: > It looks like there's already something similar in PropagateEquality which > eg X >= Y == true and replaces X < Y == false, which is somewhat similar - > could I base an addition off of that? > > > - CL > > On Jul 3, 2016, at 7:13 PM, Daniel Berlin <dberlin at dberlin.org>
2016 Apr 07
7
Implementing a proposed InstCombine optimization
I am not entirely sure this is safe. Transforming this to an fsub could change the value stored on platforms that implement negates using arithmetic instead of with bitmath (such as ours) and either canonicalize NaNs or don’t support denormals. This is actually important because this kind of bitmath on floats is very commonly used as part of algorithms for complex math functions that need to get
2016 Apr 09
2
Implementing a proposed InstCombine optimization
It’s definitely one that would need some target hooks, and is probably not actually worth doing without analysing the producers and consumers of the value. If the source and destination values need to be in floating point registers, the cost of FPR<->GPR moves is likely to be a lot higher than the cost of the subtract, even if the xor is free. If the results are going to end up in integer
2016 Jul 03
2
Path condition propagation
It's going to be really hard to do something sane in the current infrastructure. Its possible, but it would also be slow. You would have to go looking at uses of variables compared in predicates in PropagateEquality and if the uses appear in a comparison that is dominated by the true or false edge of the existing predicate, see if it tells you something about the dominated one. On Mon, Jul
2016 Apr 11
4
Implementing a proposed InstCombine optimization
> I am not entirely sure this is safe. Transforming this to an fsub could change the value stored on platforms that implement negates using arithmetic instead of with bitmath (such as ours) I think it's probably safe for IEEE754-2008 conformant platforms because negation was clarified to be a non-arithmetic bit flip that cannot cause exceptions in that specification. However, I'm sure
2016 Jul 03
2
Path condition propagation
PropagateEquality in gvn.cpp However, if you are going to do it, remember the goal is to make the code simpler and easier, not just pile on to the current mess to catch more cases :) On Mon, Jul 4, 2016, 7:51 AM Carlos Liam <carlos at aarzee.me> wrote: > Where would I look to change the equality propagation? > > > - CL > > On Jun 30, 2016, at 11:45 PM, Daniel Berlin
2016 Aug 05
2
Reasoning about results of min and max with a constant
Looks like LVI actually does have cases for max and min; would it be better to allow ValueTracking to use range analysis instead? - CL > On Aug 1, 2016, at 8:44 PM, Philip Reames <listmail at philipreames.com> wrote: > >> On 07/29/2016 07:08 PM, Carlos Liam via llvm-dev wrote: >> Hi all, >> >> Say we have this IR: >> >> %1 = icmp slt i16 %x, 0
2016 May 05
6
Code which should exit 1 is exiting 0
I have IR at https://ghostbin.com/paste/daxv5 <https://ghostbin.com/paste/daxv5> which is meant to exit 1, but it is always exiting 0. I'm using it as a template for checking if two functions @test1 and @test2 are equivalent by checking against the exhaustive possible i16 values. For this particular example it should be enough to know that for certain i16, @test1 and @test2 are *not*
2013 Nov 20
0
[LLVMdev] unsubscribe
unsubscribe ----- Original Message ----- From: llvmdev-request at cs.uiuc.edu To: llvmdev at cs.uiuc.edu Sent: Tuesday, November 19, 2013 5:08:13 PM Subject: LLVMdev Digest, Vol 113, Issue 74 Send LLVMdev mailing list submissions to llvmdev at cs.uiuc.edu To subscribe or unsubscribe via the World Wide Web, visit http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev or, via email, send a message
2016 Jul 01
0
Path condition propagation
On Thu, Jun 30, 2016 at 6:09 PM, Carlos Liam via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi all, > > Consider this C code: > > #include <stdbool.h> > > bool func(int n1, int n2, bool b) { > bool greater = n1 > n2; > if (greater && b) { > if (n1 == n2) { > return false; // unreachable > } >
2016 Jul 01
3
Path condition propagation
Hi all, Consider this C code: #include <stdbool.h> bool func(int n1, int n2, bool b) { bool greater = n1 > n2; if (greater && b) { if (n1 == n2) { return false; // unreachable } } return true; } The line marked unreachable cannot be reached, however currently LLVM does not optimize it out. I believe this is because LLVM does not
2013 Aug 08
2
[LLVMdev] Address space extension
On Thu, Aug 8, 2013 at 12:51 PM, Pete Cooper <peter_cooper at apple.com> wrote: > > > Sent from my iPhone > > > On Aug 8, 2013, at 5:39 AM, Michele Scandale <michele.scandale at gmail.com> > wrote: > > > >> On 08/08/2013 02:16 PM, Justin Holewinski wrote: > >> Why should SelectionDAGBuilder generate an explicit bitcast for a no-op >
2013 Aug 08
0
[LLVMdev] Address space extension
Sent from my iPhone > On Aug 8, 2013, at 5:39 AM, Michele Scandale <michele.scandale at gmail.com> wrote: > >> On 08/08/2013 02:16 PM, Justin Holewinski wrote: >> Why should SelectionDAGBuilder generate an explicit bitcast for a no-op >> bitcast? > > The bitcast operation isn't just the reinterpretation (change in the semantic) of the bits without any
2006 May 17
0
[LLVMdev] Obfuscation with LLVM
Hi all, I was trying to implement an obfuscation tool for C-code on the basis of LLVM. I got a prototype of the simple obfuscation transformation which converting control flow graph to something like a state machine. I am not sure I will have time to work on extending further this tool with new transformations like opaque predicates and decided to put here source code I have by now with hope
2016 Nov 17
4
Skype for Centos Desktop
Hi all. I search info in the web about how to install skype on centos 6.5, but just exists info about skype with architecture to 32 bit. someone can me explicain, how to install skype for 64 bit architecture , it's possible? thank -- *Atte. Rodrigo Pichi?ual N.* *Ingeniero Administrador de Sistemas Linux* *rodrigo.pichinual at gmail.com <rodrigo.pichinual at gmail.com>* *+56 9
2016 May 03
3
Reasoning about known bits of the absolute value of a signed integer
I'm trying to reason about how to find certain bit positions of the absolute value of a given integer value. Specifically, I want to know the highest possibly set bit and lowest possibly set bit of the absolute value, in order to find the range between the two. Note that I'm specifically trying to be as conservative as possible. This is what I have so far: If the sign bit of the
2016 Jan 11
0
Some llvm questions (for tgsi backend)
On Mon, Jan 11, 2016 at 6:07 AM, Hans de Goede <hdegoede at redhat.com> wrote: > Hi, > > After a few distractions I'm back to work on the llvm tgsi backend. I've > added clang integration and I can now compile a simple opencl program > to something which sort of looks like tgsi. > > You can find my latest work on this here: >