[PATCH] D29011: [IR] Add Freeze instruction

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 11:00:16 PST 2017


True. What's the usual test harness to make sure the verifier aborts, though?
If both the binary and the text parsers assert before generating IR,
and you're adding the instruction, so there's no other thing that
generates one, how do you test that assert? Or do we just let them be
and hope we don't end up out of sync? :-)

Thank you,
 Filipe

On Tue, Jan 24, 2017 at 6:41 PM, David Majnemer via Phabricator via
llvm-commits <llvm-commits at lists.llvm.org> wrote:
> majnemer added inline comments.
>
>
> ================
> Comment at: lib/AsmParser/LLParser.cpp:5914
> +  if (!Op->getType()->isIntegerTy())
> +    return Error(Loc, "cannot freeze non-integer type");
> +
> ----------------
> filcab wrote:
>> filcab wrote:
>> > Please test this error.
>> Even better: Should this be in the verifier only? Otherwise you're checking for the same thing in two places, which is easy to get out of sync. (Would still require a test)
> its not bad for them to be in both, the error messages are much nicer in the parser.
>
>
> https://reviews.llvm.org/D29011
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list