[llvm-bugs] [Bug 45298] New: r361050 causes assertions with vector floats

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 24 17:10:53 PDT 2020


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

            Bug ID: 45298
           Summary: r361050 causes assertions with vector floats
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: smeenai at fb.com
                CC: a.bataev at hotmail.com, gribozavr at gmail.com,
                    llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

$ cat reduced.cpp
typedef float float4 __attribute__((vector_size(16)));

template <typename T>
struct S {
  T k1 = T(0);
};

template <typename T>
class C {
  float4 f(float4 x) {
    return (float)s.k1 * x;
  }

  S<T> s;
};

$ clang -cc1 -emit-llvm -o /dev/null reduced.cpp
clang: /home/smeenai/llvm-project/clang/lib/AST/ExprConstant.cpp:13547: bool
clang::Expr::EvaluateAsFloat(llvm::APFloat &, const clang::ASTContext &,
clang::Expr::SideEffectsKind, bool) const: Assertion `!isValueDependent() &&
"Expression evaluator can't be called on a dependent expression."' failed.

This was broken by r361050 and is still broken on trunk.

-- 
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/20200325/a0b69376/attachment.html>


More information about the llvm-bugs mailing list