[llvm-bugs] [Bug 45299] New: 878a24ee244a causes assertions with vector floats

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 24 17:16:39 PDT 2020


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

            Bug ID: 45299
           Summary: 878a24ee244a 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: elizabeth.andrews at intel.com, erich.keane at intel.com,
                    gribozavr at gmail.com, llvm-bugs at lists.llvm.org,
                    melanie.blower at intel.com, neeilans at live.com,
                    richard-llvm at metafoo.co.uk, rnk at google.com

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

template <typename T>
class C {
  float4 f(float4 x) {
    return k * x;
  }

  float k;
};

$ 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 878a24ee244a and is still broken on master. Note that clang
would previously choke on a slightly more complex version of the same code
anyway though: https://bugs.llvm.org/show_bug.cgi?id=45298

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


More information about the llvm-bugs mailing list