search for: canevaluatetruncated

Displaying 4 results from an estimated 4 matches for "canevaluatetruncated".

2016 Aug 17
2
Cost model is missing in InstCombiner
Hi, I think canEvaluateTruncated() in InstCombiner needs use cost model to decide whether perform optimization or not. Without cost model from TargetTransformInfo, aggressively optimizing IR in vector types according to the number of bits demanded may lead to scalarization of vector operations. For example, if the input IR is:...
2017 May 18
2
Question about demanded bits analysis
Hello All, I am trying to understand the demanded-bits pass. The example in the source code (below) seems quite explicit. In the example, only 16 bits from a 32 bit variable in IR are demanded and therefore the variable is truncated to a 16 bit variable. %1 = add i32 %x, %y %2 = trunc i32 %1 to i16 However I was wondering if for example, the addition demanded, say 18 bits, would this pass
2016 Aug 18
2
Cost model is missing in InstCombiner
...rg > Sent: Thursday, August 18, 2016 11:05:35 AM > Subject: Re: [llvm-dev] Cost model is missing in InstCombiner > +David M. > > On Aug 17, 2016, at 3:48 AM, Shixiong Xu via llvm-dev < > > llvm-dev at lists.llvm.org > wrote: > > > Hi, > > > I think canEvaluateTruncated() in InstCombiner needs use cost model > > to decide whether perform optimization or not. > > I’ve always seen InstCombine as doing “canonicalization” of the IR > and not “optimization”. So the output of InstCombine should be in a > form that is the most suitable for further anal...
2016 May 31
3
Signed Division and InstCombine
I was looking through the InstCombine pass, and I was wondering why signed division is not considered a valid operation to combine in the canEvaluateTruncated function. This means, given the following code: %conv = sext i16 %0 to i32 %conv1 = sext i16 %1 to i32 %div = sdiv i32 %conv, %conv1 %conv2 = trunc i32 %div to i16 * Assume %0 and %1 are registers created from simple 16-bit loads. We cannot reduce the sequence to: %div = sdiv i16 %0 %1 What is...