Displaying 3 results from an estimated 3 matches for "convertselectofconstantstomath".
2018 Jul 03
4
Question about canonicalizing cmp+select
Hi, Sanjay/all,
I noticed in rL331486 that some compare-select optimizations are disabled
in favor of providing canonicalized cmp+select to the backend.
I am currently working on a private backend target, and the target has a
small code size limit. With this change, some of the apps went over the
codesize limit. As an example,
C code:
b = (a > -1) ? 4 : 5;
ll code:
Before rL331486:
2018 Jul 03
2
Question about canonicalizing cmp+select
...e DAGCombiner already has this transformation implemented?
>>
>> Thanks,
>> --Yuan
>>
>> On Tue, Jul 3, 2018 at 11:22 AM Sanjay Patel <spatel at rotateright.com>
>> wrote:
>>
>>> Do you run DAGCombiner? And are you overriding
>>> TLI.convertSelectOfConstantsToMath(VT) for your target?
>>>
>>> For the stated example (true val and false val constants in the select
>>> differ by 1), that should already be converted.
>>>
>>>
>>> On Tue, Jul 3, 2018 at 12:13 PM, Roman Lebedev <lebedev.ri at gmail.com>
&g...
2017 Jul 01
8
[IR canonicalization] 6 ways to choose {-1,0,1}
I'm looking at the output of memcmp() expansion (D34904), and I noticed
that there are many ways to produce the common positive/zero/negative
comparison result in IR.
For the following 6 functionally equivalent C source functions, we produce
6 different versions of IR which leads to 6 different asm outputs for x86.
Which of these should we choose as canonical IR form?
1. Two selects
int