[PATCH] MachineVerifier: Handle the optional def operand in a PATCHPOINT instruction.

Juergen Ributzka via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 09:27:16 PDT 2015


Hi Alex,

thanks for fixing this.


I just have a small nitpick. Please add parenthesis around the condition to increase readability.

NumDefs = MONum == 0 && MO->isReg() ? NumDefs : 0;

Besides that LGTM.

—Juergen


> On Aug 8, 2015, at 11:55 AM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> 
>> On 2015-Aug-07, at 17:15, Alex L <arphaman at gmail.com> wrote:
>> 
>> Hi,
>> 
>> The PATCHPOINT instructions have a single optional defined register operand,
>> but the machine verifier can't verify the optional defined register operands.
> 
> Seems reasonable to me, but I guess I'm not sure.  Maybe someone familiar with
> patchpoint (Philip? Juergen?) could have a look at this one.
> 
>> So, this patch makes sure that the machine verifier won't report an error when a PATCHPOINT
>> instruction doesn't have its optional defined register operand.
>> 
>> This change will allow us to enable the machine verifier for the code generation tests for the
>> patchpoint intrinsics.
>> 
>> Cheers,
>> Alex
>> <0001-MachineVerifier-Handle-the-optional-def-operand-in-P.patch>
> 



More information about the llvm-commits mailing list