[PATCH] D24397: Target Power9 bit counting and vector comparison instructions through builtins (front end portion)

Sanjay Patel via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 09:53:57 PDT 2016


spatel added a comment.

In https://reviews.llvm.org/D24397#555552, @nemanjai wrote:

> In https://reviews.llvm.org/D24397#555470, @spatel wrote:
>
> > Having a clang regression/unit test that depends on optimizer behavior is generally viewed as wrong. Can the tests be split into front-end (clang) tests and separate tests for the IR optimizer? Both x86 and AArch64 have done something like that in the last few months for testing of builtins/intrinsics.
>
>
> Yeah, that sounds reasonable. I'll remove the -O2 from the test case and remove the checks for the select instructions. That's really the only major difference. So am I to understand the nsw/nuw flags will not be added without -O2 and the aforementioned changes will suffice?


Changing to -O0 or using -disable-llvm-optzns should keep the clang tests from breaking due to underlying changes in the IR optimizer. That may lead to a lot of bloat though. In http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160307/152324.html , it was viewed as ok, if not ideal, to pipe the clang IR output using "opt -S -mem2reg".

Note that clang itself uses APIs like IRBuilder::CreateNUWSub(), so I think it's possible to see no-wrap IR even without the IR optimizer kicking in (but probably isn't a concern in this case?).


Repository:
  rL LLVM

https://reviews.llvm.org/D24397





More information about the cfe-commits mailing list