<div dir="ltr"><pre><span class="gmail-stdout"><font color="#000000" face="Courier New, courier, monotype, monospace" size="3"><a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/6924/steps/check-llvm%20ubsan/logs/stdio">http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/6924/steps/check-llvm%20ubsan/logs/stdio</a><br></font></span></pre><pre><span class="gmail-stdout"><font color="#000000" face="Courier New, courier, monotype, monospace" size="3"><br></font></span></pre><pre style="font-family:"Courier New",courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span class="gmail-stdout">Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.
FAIL: LLVM :: MC/AMDGPU/exp.s (14527 of 21592)
******************** TEST 'LLVM :: MC/AMDGPU/exp.s' FAILED ********************
Script:
--
/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/./bin/llvm-mc -arch=amdgcn -show-encoding /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/MC/AMDGPU/exp.s | /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/./bin/FileCheck -check-prefix=SI /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/MC/AMDGPU/exp.s
/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/./bin/llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/MC/AMDGPU/exp.s | /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/./bin/FileCheck -check-prefix=VI /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/MC/AMDGPU/exp.s
--
Exit Code: 2
Command Output (stderr):
--
lib/Target/AMDGPU/AMDGPUGenAsmMatcher.inc:9073:33: runtime error: index -1 out of bounds for type 'unsigned int [12]'
#0 0x4e1272 in (anonymous namespace)::AMDGPUAsmParser::convertToMCInst(unsigned int, llvm::MCInst&, unsigned int, llvm::SmallVectorImpl<std::unique_ptr<llvm::MCParsedAsmOperand, std::default_delete<llvm::MCParsedAsmOperand> > > const&, llvm::SmallBitVector const&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/lib/Target/AMDGPU/AMDGPUGenAsmMatcher.inc:9073:33
#1 0x4c7230 in (anonymous namespace)::AMDGPUAsmParser::MatchInstructionImpl(llvm::SmallVectorImpl<std::unique_ptr<llvm::MCParsedAsmOperand, std::default_delete<llvm::MCParsedAsmOperand> > > const&, llvm::MCInst&, unsigned long&, bool, unsigned int) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/lib/Target/AMDGPU/AMDGPUGenAsmMatcher.inc:19873:5
#2 0x4b55b8 in (anonymous namespace)::AMDGPUAsmParser::MatchAndEmitInstruction(llvm::SMLoc, unsigned int&, llvm::SmallVectorImpl<std::unique_ptr<llvm::MCParsedAsmOperand, std::default_delete<llvm::MCParsedAsmOperand> > >&, llvm::MCStreamer&, unsigned long&, bool) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:2222:14
#3 0x8f37ad in (anonymous namespace)::AsmParser::parseStatement((anonymous namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/MC/MCParser/AsmParser.cpp:2224:27
#4 0x8eb2c8 in (anonymous namespace)::AsmParser::Run(bool, bool) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/MC/MCParser/AsmParser.cpp:883:10
#5 0x454d70 in AssembleInput(char const*, llvm::Target const*, llvm::SourceMgr&, llvm::MCContext&, llvm::MCStreamer&, llvm::MCAsmInfo&, llvm::MCSubtargetInfo&, llvm::MCInstrInfo&, llvm::MCTargetOptions&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/llvm-mc/llvm-mc.cpp:425:21
#6 0x453529 in main /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/llvm-mc/llvm-mc.cpp:608:11
#7 0x7f0e4bcf382f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#8 0x42d138 in _start (/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/bin/llvm-mc+0x42d138)
FileCheck error: '-' is empty.
FileCheck command line: /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/./bin/FileCheck -check-prefix=SI /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/MC/AMDGPU/exp.s
</span></pre><div><span class="gmail-stdout"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 3, 2017 at 9:37 AM, Changpeng Fang via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: chfang<br>
Date: Thu Aug 3 09:37:02 2017<br>
New Revision: 309959<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=309959&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=309959&view=rev</a><br>
Log:<br>
AMDGPU/SI: Don't fix a PHI under uniform branch in SIFixSGPRCopies only when sources and destination are all sgprs<br>
<br>
Summary:<br>
If a PHI has at lease one VGPR operand, we have to fix the PHI<br>
in SIFixSGPRCopies.<br>
<br>
Reviewer:<br>
Matt<br>
<br>
Differential Revision:<br>
<a href="http://reviews.llvm.org/D34727" rel="noreferrer" target="_blank">http://reviews.llvm.org/D34727</a><br>
<br>
Modified:<br>
llvm/trunk/lib/Target/AMDGPU/<wbr>SIFixSGPRCopies.cpp<br>
llvm/trunk/test/CodeGen/<wbr>AMDGPU/uniform-cfg.ll<br>
<br>
Modified: llvm/trunk/lib/Target/AMDGPU/<wbr>SIFixSGPRCopies.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp?rev=309959&r1=309958&r2=309959&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/Target/<wbr>AMDGPU/SIFixSGPRCopies.cpp?<wbr>rev=309959&r1=309958&r2=<wbr>309959&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Target/AMDGPU/<wbr>SIFixSGPRCopies.cpp (original)<br>
+++ llvm/trunk/lib/Target/AMDGPU/<wbr>SIFixSGPRCopies.cpp Thu Aug 3 09:37:02 2017<br>
@@ -604,7 +604,8 @@ bool SIFixSGPRCopies::<wbr>runOnMachineFuncti<br>
<br>
// We don't need to fix the PHI if the common dominator of the<br>
// two incoming blocks terminates with a uniform branch.<br>
- if (MI.getNumExplicitOperands() == 5) {<br>
+ bool HasVGPROperand = phiHasVGPROperands(MI, MRI, TRI, TII);<br>
+ if (MI.getNumExplicitOperands() == 5 && !HasVGPROperand) {<br>
MachineBasicBlock *MBB0 = MI.getOperand(2).getMBB();<br>
MachineBasicBlock *MBB1 = MI.getOperand(4).getMBB();<br>
<br>
@@ -649,8 +650,7 @@ bool SIFixSGPRCopies::<wbr>runOnMachineFuncti<br>
// is no chance for values to be over-written.<br>
<br>
SmallSet<unsigned, 8> Visited;<br>
- if (phiHasVGPROperands(MI, MRI, TRI, TII) ||<br>
- !phiHasBreakDef(MI, MRI, Visited)) {<br>
+ if (HasVGPROperand || !phiHasBreakDef(MI, MRI, Visited)) {<br>
DEBUG(dbgs() << "Fixing PHI: " << MI);<br>
TII->moveToVALU(MI);<br>
}<br>
<br>
Modified: llvm/trunk/test/CodeGen/<wbr>AMDGPU/uniform-cfg.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/uniform-cfg.ll?rev=309959&r1=309958&r2=309959&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/AMDGPU/uniform-cfg.ll?<wbr>rev=309959&r1=309958&r2=<wbr>309959&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/<wbr>AMDGPU/uniform-cfg.ll (original)<br>
+++ llvm/trunk/test/CodeGen/<wbr>AMDGPU/uniform-cfg.ll Thu Aug 3 09:37:02 2017<br>
@@ -557,6 +557,28 @@ done:<br>
ret void<br>
}<br>
<br>
+; GCN-LABEL: {{^}}move_to_valu_vgpr_<wbr>operand_phi:<br>
+; GCN: v_add_i32_e32<br>
+; GCN: ds_write_b32<br>
+define void @move_to_valu_vgpr_operand_<wbr>phi(i32 addrspace(3)* %out) {<br>
+bb0:<br>
+ br label %bb1<br>
+<br>
+bb1: ; preds = %bb3, %bb0<br>
+ %tmp0 = phi i32 [ 8, %bb0 ], [ %tmp4, %bb3 ]<br>
+ %tmp1 = add nsw i32 %tmp0, -1<br>
+ %tmp2 = getelementptr inbounds i32, i32 addrspace(3)* %out, i32 %tmp1<br>
+ br i1 undef, label %bb2, label %bb3<br>
+<br>
+bb2: ; preds = %bb1<br>
+ store volatile i32 1, i32 addrspace(3)* %tmp2, align 4<br>
+ br label %bb3<br>
+<br>
+bb3: ; preds = %bb2, %bb1<br>
+ %tmp4 = add nsw i32 %tmp0, 2<br>
+ br label %bb1<br>
+}<br>
+<br>
declare i32 @llvm.amdgcn.workitem.id.x() #0<br>
<br>
attributes #0 = { nounwind readnone }<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">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/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>