[llvm-bugs] [Bug 27177] inlining and constant propagation to intrinsics

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 13 13:13:43 PST 2017


https://bugs.llvm.org/show_bug.cgi?id=27177

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |richard-llvm at metafoo.co.uk
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #10 from Reid Kleckner <rnk at google.com> ---
This incompatibility between clang and GCC has been known about for years, and
there are no plans to fix it, so I think we should mark this as wontfix to help
document the state of the world.

There are two obvious ways to fix the issue:
- Inline in the frontend before checking that certain intrinsic arguments are
constants
- Delay intrinsic argument checking until after inlining

Neither solution is acceptable. We aren't going to reinvent inlining in the
frontend, and delaying semantic checking makes program acceptance depend on
optimization level, which we try hard to avoid.

The way clang behaves today is predictable, if primitive: you have to pass
constants to intrinsics that require constant arguments. always_inline wrappers
that forward constant arguments, such as 'bla' in your example, are not
allowed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170213/933ec0e9/attachment.html>


More information about the llvm-bugs mailing list