Reapply r155682, making constant folding more consistent, with a fix to work
[oota-llvm.git] / test / CodeGen / PTX / simple-call.ll
index 1e980655d3e629eb2517ccda97a9e1f5658bc378..77ea29eae8bd3da9bef155910807887c5841dd9a 100644 (file)
@@ -12,3 +12,16 @@ define ptx_device float @test_call(float %x, float %y) {
   call void @test_add(float %a, float %y)
   ret float %a
 }
+
+define ptx_device float @test_compute(float %x, float %y) {
+; CHECK: ret;
+  %z = fadd float %x, %y
+  ret float %z
+}
+
+define ptx_device float @test_call_compute(float %x, float %y) {
+; CHECK: call.uni (__localparam_{{[0-9]+}}), test_compute, (__localparam_{{[0-9]+}}, __localparam_{{[0-9]+}})
+  %z = call float @test_compute(float %x, float %y)
+  ret float %z
+}
+