[clang] 83f4372 - [CodeGen] fix clang test that runs the optimizer pipeline; NFC

Sanjay Patel via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 07:14:45 PST 2020


https://reviews.llvm.org/rG8cdcbcaa02e7
https://reviews.llvm.org/rG1e308452bf68

On Thu, Feb 27, 2020 at 6:29 PM Eric Christopher <echristo at gmail.com> wrote:

> Sure. That sounds great. Thanks!
>
> On Wed, Feb 26, 2020 at 10:45 AM Sanjay Patel <spatel at rotateright.com>
> wrote:
>
>> To be clear - the test is checking IR instructions, but it's checking -O1
>> IR for various targets.
>> So there must be different expectations per target...
>> But I just tried a test of turning everything down to -O0, and it all
>> passed except for the "fast-math" run for AArch64.
>> I can tweak that to not be so specific if that sounds like a reasonable
>> solution.
>>
>> On Wed, Feb 26, 2020 at 1:05 PM Eric Christopher <echristo at gmail.com>
>> wrote:
>>
>>> I mean anything that's testing assembly output out of clang is less than
>>> ideal. There are some circumstances, but this doesn't seem like one of
>>> them.
>>>
>>> On Wed, Feb 26, 2020, 9:10 AM Sanjay Patel <spatel at rotateright.com>
>>> wrote:
>>>
>>>> The test file dates back to:
>>>> https://reviews.llvm.org/D5698
>>>> ...and I'm not familiar with _Complex enough to say how to fix this
>>>> properly (seems like the check lines are already limited such that -O0
>>>> rather than -O1 would work?).
>>>>
>>>> But this file keeps wiggling unexpectedly, it's going to move again
>>>> with https://reviews.llvm.org/D75130
>>>>
>>>> On Tue, Feb 25, 2020 at 1:15 PM Eric Christopher <echristo at gmail.com>
>>>> wrote:
>>>>
>>>>> Is there any way to pull this test out of clang and as an opt test?
>>>>> What's it trying to test?
>>>>>
>>>>> -eric
>>>>>
>>>>> On Tue, Feb 25, 2020 at 6:15 AM Sanjay Patel via cfe-commits <
>>>>> cfe-commits at lists.llvm.org> wrote:
>>>>>
>>>>>>
>>>>>> Author: Sanjay Patel
>>>>>> Date: 2020-02-25T09:13:49-05:00
>>>>>> New Revision: 83f4372f3a708ceaa800feff8b1bd92ae2c3be5f
>>>>>>
>>>>>> URL:
>>>>>> https://github.com/llvm/llvm-project/commit/83f4372f3a708ceaa800feff8b1bd92ae2c3be5f
>>>>>> DIFF:
>>>>>> https://github.com/llvm/llvm-project/commit/83f4372f3a708ceaa800feff8b1bd92ae2c3be5f.diff
>>>>>>
>>>>>> LOG: [CodeGen] fix clang test that runs the optimizer pipeline; NFC
>>>>>>
>>>>>> There's already a FIXME note on this file; it can break when the
>>>>>> underlying LLVM behavior changes independently of anything in clang.
>>>>>>
>>>>>> Added:
>>>>>>
>>>>>>
>>>>>> Modified:
>>>>>>     clang/test/CodeGen/complex-math.c
>>>>>>
>>>>>> Removed:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ################################################################################
>>>>>> diff  --git a/clang/test/CodeGen/complex-math.c
>>>>>> b/clang/test/CodeGen/complex-math.c
>>>>>> index e42418ad72c2..54dee473a364 100644
>>>>>> --- a/clang/test/CodeGen/complex-math.c
>>>>>> +++ b/clang/test/CodeGen/complex-math.c
>>>>>> @@ -93,14 +93,15 @@ float _Complex mul_float_rc(float a, float
>>>>>> _Complex b) {
>>>>>>    // X86: ret
>>>>>>    return a * b;
>>>>>>  }
>>>>>> +
>>>>>>  float _Complex mul_float_cc(float _Complex a, float _Complex b) {
>>>>>>    // X86-LABEL: @mul_float_cc(
>>>>>>    // X86: %[[AC:[^ ]+]] = fmul
>>>>>>    // X86: %[[BD:[^ ]+]] = fmul
>>>>>>    // X86: %[[AD:[^ ]+]] = fmul
>>>>>>    // X86: %[[BC:[^ ]+]] = fmul
>>>>>> -  // X86: %[[RR:[^ ]+]] = fsub float %[[AC]], %[[BD]]
>>>>>> -  // X86: %[[RI:[^ ]+]] = fadd float
>>>>>> +  // X86: %[[RR:[^ ]+]] = fsub
>>>>>> +  // X86: %[[RI:[^ ]+]] = fadd
>>>>>>    // X86-DAG: %[[AD]]
>>>>>>    // X86-DAG: ,
>>>>>>    // X86-DAG: %[[BC]]
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> cfe-commits mailing list
>>>>>> cfe-commits at lists.llvm.org
>>>>>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>>>>>
>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200302/fb5caae6/attachment-0001.html>


More information about the cfe-commits mailing list