[PATCH] D11954: AMDGPU/SI: Add test for constant folding

Axel Davy via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 11:56:28 PDT 2015


axeldavy created this revision.
axeldavy added a reviewer: tstellarAMD.
axeldavy added a subscriber: llvm-commits.

This test currently fails

http://reviews.llvm.org/D11954

Files:
  test/CodeGen/AMDGPU/si-literals.ll

Index: test/CodeGen/AMDGPU/si-literals.ll
===================================================================
--- /dev/null
+++ test/CodeGen/AMDGPU/si-literals.ll
@@ -0,0 +1,17 @@
+; XFAIL: *
+; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -strict-whitespace %s
+
+; CHECK-LABEL: {{^}}main:
+; CHECK-NOT: v_mov
+
+define void @main(float) #0 {
+main_body:
+  %1 = fmul float %0, 0x3FE86A7F00000000
+  %2 = fmul float %0, 0xBFE86A7F00000000
+  call void @llvm.SI.export(i32 15, i32 0, i32 1, i32 12, i32 0, float %1, float %1, float %2, float %2)
+  ret void
+}
+
+declare void @llvm.SI.export(i32, i32, i32, i32, i32, float, float, float, float)
+
+attributes #0 = { "ShaderType"="1" }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11954.31845.patch
Type: text/x-patch
Size: 712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150811/4c2ee1bd/attachment.bin>


More information about the llvm-commits mailing list