[llvm-dev] "Didn't provide enough results" assertion

m m via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 17 09:41:30 PST 2019

Quick update: If I add an output register, the assertion goes away.

def ASTI: F<0b100001,(outs CPURegs:$ra),(ins i32imm:$i10s),"ASTI $i10s",[(set CPURegs:$ra, (i32 (add (i32 SP), (i32 sext12To32Trunc2imm:$i10s))))] > {

Why can't this instruction be without output register?
From: m m
Sent: Saturday, January 12, 2019 1:58 PM
To: via llvm-dev
Subject: "Didn't provide enough results" assertion


I am getting this assertion when building my project: `Ops.size() >= NumSrcResults && "Didn't provide enough results"'

this is the instruction that causes it:

def ASTI: F<0b100001,(outs),(ins i32imm:$i10s),"ASTI $i10s",[(set SP, (i32 (add (i32 SP), (i32 sext12To32Trunc2imm:$i10s))))] > {

        let isReMaterializable = 1;
        let mayLoad = 0;
        let mayStore = 0;
        let Defs = [SP];
        let Uses = [SP];

I've been staring at it for a while and can't identify what the problem is. It is supposed to add an immediate to the SP and store the result back in SP (i.e. SP = SP + i10s). When I print Ops.size() and NumSrcResults, I get 0 and 2


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190117/6079d66a/attachment.html>

More information about the llvm-dev mailing list