[llvm] r276051 - AMDGPU: Change fdiv lowering based on !fpmath metadata

Marek Olšák via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 09:33:51 PDT 2016


Replacing x/y with x*(1/y) in our driver fixes the regression.

Marek

On Tue, Jul 26, 2016 at 3:08 AM, Marek Olšák <maraeo at gmail.com> wrote:
> The IR is attached.
>
> Marek
>
> On Tue, Jul 26, 2016 at 3:06 AM, Matt Arsenault
> <Matthew.Arsenault at amd.com> wrote:
>> On 07/25/2016 06:02 PM, Marek Olšák wrote:
>>>
>>> On Tue, Jul 26, 2016 at 2:56 AM, Matt Arsenault
>>> <Matthew.Arsenault at amd.com> wrote:
>>>>
>>>> On 07/25/2016 05:51 PM, Marek Olšák via llvm-commits wrote:
>>>>>
>>>>> The commit actually regresses code quality a lot on Tonga:
>>>>>
>>>>> Totals from affected shaders:
>>>>> VGPRS: 488066 -> 504815 (3.43 %)
>>>>> Spilled VGPRs: 278 -> 361 (29.86 %)
>>>>> Scratch VGPRs: 1060 -> 1144 (7.92 %) dwords per thread
>>>>> Code Size: 26675564 -> 28796812 (7.95 %) bytes
>>>>> Max Waves: 105039 -> 102285 (-2.62 %)
>>>>>
>>>>> Marek
>>>>>
>>>>>
>>>> Do you have an example testcase?
>>>
>>> I see this in the asm diff:
>>>
>>> -       v_rsq_f32_e32
>>> +       v_sqrt_f32_e32
>>> +       v_cmp_gt_f32_e64
>>> +       v_cndmask_b32_e32
>>> +       v_mul_f32_e32
>>> +       v_rcp_f32_e32
>>>
>>> I guess that's better than a test case?
>>>
>>> Marek
>>
>> This might be a correct change, so I'm not 100% sure without seeing the IR


More information about the llvm-commits mailing list