[PATCH] D25438: [mips] Fix Mips MSA instrinsics
Vasileios Kalintiris via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 21 07:57:47 PDT 2016
ehostunreach added a comment.
In https://reviews.llvm.org/D25438#575338, @sdardis wrote:
> The problem with just crashing, is that reason for the crash is completely unclear.
We can definitely "crash" and let our users see the reason with a meaningful message displaying the correct value range for the specific intrinsic. These intrinsics are MIPS-specific and do not get generated by LLVM but by its frontends (either the source language or any other code-generation library that our users are developing for MIPS-specific optimizations). For example, C and C++ are covered by your correspondent Clang patch that catches these errors at the input source.
> The two changed lines in SelectionDAG.cpp from zext to zextOrTrunc ensure that handling a constant that doesn't need promotion doesn't force an assertion error in APInt's zext. I went with this solution as it seemed to be the least invasive.
Such cases would indicate a problem/bug in the surrounding code, which as far as I can tell, looks good to me. That's why I'm wondering if you had any specific example that triggered the assertions in zext() or trunc().
More information about the llvm-commits