R600: Fix encoding of CF_END_{EG, R600} instructions
authorTom Stellard <thomas.stellard@amd.com>
Mon, 29 Apr 2013 22:23:54 +0000 (22:23 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 29 Apr 2013 22:23:54 +0000 (22:23 +0000)
The EOP bit was not being encoded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180734 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/R600Instructions.td
test/CodeGen/R600/cf_end.ll [new file with mode: 0644]

index f74c5a651e894b4dab4f3c76780cd60d15425729..5757f64df1e196eb4ed6fd96c23fa678d5c81abc 100644 (file)
@@ -906,6 +906,7 @@ class CF_WORD1_EG {
   let Word1{9-8} = COND;
   let Word1{15-10} = COUNT;
   let Word1{20} = VALID_PIXEL_MODE;
+  let Word1{21} = END_OF_PROGRAM;
   let Word1{29-22} = CF_INST;
   let Word1{31} = BARRIER;
 }
diff --git a/test/CodeGen/R600/cf_end.ll b/test/CodeGen/R600/cf_end.ll
new file mode 100644 (file)
index 0000000..67d5e3e
--- /dev/null
@@ -0,0 +1,6 @@
+; RUN: llc < %s -march=r600 -mcpu=redwood --show-mc-encoding | FileCheck %s
+
+; CHECK: CF_END ; encoding: [0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x80]
+define void @eop() {
+  ret void
+}