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

            Bug ID: 27177
           Summary: inlining and constant propagation to intrinsics
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: m...@sven-woop.de
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

Created attachment 16148
  --> https://llvm.org/bugs/attachment.cgi?id=16148&action=edit
reproducer

I just ran into an issue where constants are not properly propagated to an
intrinsic which requires a constant argument. Compilation fails with an
appropiate error. Here a simple reproducer:

#include <immintrin.h>

inline __attribute__((always_inline)) void bla(__m128 a, __m128 b, const int x)
{
  _mm_blend_ps(a, b, x);
}

int main()
{
  __m128 a = _mm_set1_ps(1.0f);
  __m128 b = _mm_set1_ps(2.0f);
  const int x = 4;
  bla(a,b,x);
}

Looks like the inlining happens too late.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to