<div dir="ltr">Hello, this new test fails for me.<div><br></div><div><div>FAIL: LLVM :: CodeGen/MIR/Generic/machine-cse-physreg.mir (6862 of 20759)</div><div>******************** TEST 'LLVM :: CodeGen/MIR/Generic/machine-cse-physreg.mir' FAILED ********************</div><div>Script:</div><div>--</div><div>D:/src/llvmbuild/ninja/./bin\llc.EXE -mtriple thumbv5e -run-pass=machine-cse -o - D:\src\llvm-mono\llvm\test\CodeGen\MIR\Generic\machine-cse-physreg.mir | D:/src/llvmbuild/ninja/./bin\FileCheck.EXE D:\src\llvm-mono\llvm\test\CodeGen\MIR\Generic\machine-cse-physreg.mir</div><div>--</div><div>Exit Code: 2</div><div><br></div><div>Command Output (stdout):</div><div>--</div><div>$ "D:/src/llvmbuild/ninja/./bin\llc.EXE" "-mtriple" "thumbv5e" "-run-pass=machine-cse" "-o" "-" "D:\src\llvm-mono\llvm\test\CodeGen\MIR\Generic\machine-cse-physreg.mir"</div><div># command stderr:</div><div>D:/src/llvmbuild/ninja/./bin\llc.EXE: : error: unable to get target for 'thumbv5e', see --version and --triple.</div><div><br></div><div>error: command failed with exit status: 1</div><div>$ "D:/src/llvmbuild/ninja/./bin\FileCheck.EXE" "D:\src\llvm-mono\llvm\test\CodeGen\MIR\Generic\machine-cse-physreg.mir"</div><div># command stderr:</div><div>FileCheck error: '-' is empty.</div><div>FileCheck command line: D:/src/llvmbuild/ninja/./bin\FileCheck.EXE D:\src\llvm-mono\llvm\test\CodeGen\MIR\Generic\machine-cse-physreg.mir</div><div><br></div><div>error: command failed with exit status: 2</div><div><br></div><div>--</div></div><div><br></div><div>I compile with LLVM_TARGETS_TO_BUILD=X86. It looks like perhaps this test assumes that thumb target is available? Can you please fix the test to not fail when the appropriate target is not available?</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, May 24, 2017 at 2:35 AM Mikael Holmén via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This revision was automatically updated to reflect the committed changes.<br>
Closed by commit rL303731: MachineCSE: Respect interblock physreg liveness (authored by uabelho).<br>
<br>
Changed prior to commit:<br>
<a href="https://reviews.llvm.org/D33408?vs=99746&id=100057#toc" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33408?vs=99746&id=100057#toc</a><br>
<br>
Repository:<br>
rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D33408" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33408</a><br>
<br>
Files:<br>
llvm/trunk/lib/CodeGen/MachineCSE.cpp<br>
llvm/trunk/test/CodeGen/MIR/Generic/machine-cse-physreg.mir<br>
<br>
<br>
Index: llvm/trunk/test/CodeGen/MIR/Generic/machine-cse-physreg.mir<br>
===================================================================<br>
--- llvm/trunk/test/CodeGen/MIR/Generic/machine-cse-physreg.mir<br>
+++ llvm/trunk/test/CodeGen/MIR/Generic/machine-cse-physreg.mir<br>
@@ -0,0 +1,35 @@<br>
+# RUN: llc -mtriple thumbv5e -run-pass=machine-cse -o - %s | FileCheck %s<br>
+<br>
+# This is a contrived example made to expose a bug in<br>
+# MachineCSE, see PR32538.<br>
+<br>
+# MachineCSE must not remove this def of %cpsr:<br>
+# CHECK-LABEL: bb.1:<br>
+# CHECK: , %cpsr = tLSLri<br>
+<br>
+...<br>
+---<br>
+name: spam<br>
+registers:<br>
+ - { id: 0, class: tgpr }<br>
+ - { id: 1, class: tgpr }<br>
+ - { id: 2, class: tgpr }<br>
+ - { id: 3, class: tgpr }<br>
+liveins:<br>
+ - { reg: '%r0', virtual-reg: '%0' }<br>
+body: |<br>
+ bb.0:<br>
+ liveins: %r0<br>
+ %0 = COPY %r0<br>
+ %1, %cpsr = tLSLri %0, 2, 14, _<br>
+ tCMPi8 %0, 5, 14, _, implicit-def %cpsr<br>
+ tBcc %bb.8, 8, %cpsr<br>
+<br>
+ bb.1:<br>
+ %2, %cpsr = tLSLri %0, 2, 14, _<br>
+<br>
+ bb.8:<br>
+ liveins: %cpsr<br>
+ %3 = COPY %cpsr<br>
+ tSTRi killed %3, %0, 0, 14, _<br>
+...<br>
Index: llvm/trunk/lib/CodeGen/MachineCSE.cpp<br>
===================================================================<br>
--- llvm/trunk/lib/CodeGen/MachineCSE.cpp<br>
+++ llvm/trunk/lib/CodeGen/MachineCSE.cpp<br>
@@ -180,8 +180,8 @@<br>
I = skipDebugInstructionsForward(I, E);<br>
<br>
if (I == E)<br>
- // Reached end of block, register is obviously dead.<br>
- return true;<br>
+ // Reached end of block, we don't know if register is dead or not.<br>
+ return false;<br>
<br>
bool SeenDef = false;<br>
for (const MachineOperand &MO : I->operands()) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>