<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Quick update: If I add an output register, the assertion goes away.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: "Courier New", monospace, serif, EmojiFont">def ASTI: F<0b100001,<b>(outs CPURegs:$ra)</b>,(ins i32imm:$i10s),"<span>ASTI</span> $i10s",[(set
<b>CPURegs:$ra</b>, (i32 (add (i32 SP), (i32 sex</span><span><span style="font-family: "Courier New", monospace, serif, EmojiFont">t12To32Trunc2imm:$i10s))))] > {</span><span><br>
</span></span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Why can't this instruction be without output register?<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> m m<br>
<b>Sent:</b> Saturday, January 12, 2019 1:58 PM<br>
<b>To:</b> via llvm-dev<br>
<b>Subject:</b> "Didn't provide enough results" assertion</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>Hi,</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>I am getting this assertion when building my project: `Ops.size() >= NumSrcResults && "Didn't provide enough results"'<br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span>this is the instruction that causes it:<br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:"Courier New",monospace">def ASTI: F<0b100001,(outs),(ins i32imm:$i10s),"<span style="font-family:"Courier New",monospace">ASTI</span> $i10s",[(set SP, (i32 (add (i32 SP), (i32 sex</span><span><span style="font-family:"Courier New",monospace">t12To32Trunc2imm:$i10s))))]
 > {</span><span><br>
</span><span></span><br>
</span>
<div><br>
</div>
<div><span style="font-family:"Courier New",monospace">        let isReMaterializable = 1;</span><br>
</div>
<div><span style="font-family:"Courier New",monospace">        let mayLoad = 0;</span><br>
</div>
<div><span style="font-family:"Courier New",monospace">        let mayStore = 0;</span><br>
</div>
<div><span style="font-family:"Courier New",monospace">        let Defs = [SP];</span><br>
</div>
<div><span style="font-family:"Courier New",monospace">        let Uses = [SP];</span><br>
</div>
<div><span style="font-family:"Courier New",monospace">}</span></div>
<div><br>
</div>
<div>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
<span>Ops.size() and NumSrcResults</span>, I get 0 and 2</div>
<div><br>
</div>
<div>Thanks.<br>
</div>
<span></span><br>
</div>
</div>
</body>
</html>