diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2015-08-27 17:41:27 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2015-08-27 17:41:27 +0000 |
commit | 053ae1f5e3dbb7e28050b5ad09b51ae8bce7e1be (patch) | |
tree | 0cdc78b871e1ee9ceee390e196aa84d1508431b1 | |
parent | a23672626d4ecaacd180906afaa27b2ff1e03660 (diff) | |
download | bcm5719-llvm-053ae1f5e3dbb7e28050b5ad09b51ae8bce7e1be.tar.gz bcm5719-llvm-053ae1f5e3dbb7e28050b5ad09b51ae8bce7e1be.zip |
AMDGPU/SI: Add test for folding constants into operands
Patch by Axel Davy
llvm-svn: 246167
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/si-literal-folding.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/si-literal-folding.ll b/llvm/test/CodeGen/AMDGPU/si-literal-folding.ll new file mode 100644 index 00000000000..901b3c3453f --- /dev/null +++ b/llvm/test/CodeGen/AMDGPU/si-literal-folding.ll @@ -0,0 +1,17 @@ +; XFAIL: * +; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck %s + +; CHECK-LABEL: {{^}}main: +; CHECK-NOT: v_mov_b32_e32 v{{[0-9]+}}, 0xbf4353f8 + +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" } |