30 lines · plain
1; RUN: llc -mtriple=nvptx64 < %s | FileCheck %s2; RUN: %if ptxas %{ llc -mtriple=nvptx64 < %s | %ptxas-verify %}3 4; Test that %c works with immediates5; CHECK-LABEL: test_inlineasm_c_output_template06; CHECK: //TEST 427define dso_local i32 @test_inlineasm_c_output_template0() {8 tail call void asm sideeffect "//TEST ${0:c}", "i"(i32 42)9 ret i32 4210}11 12; Test that %c works with global address13; FIXME: seems this case isn't handled properly by14; SelectionDAG TargetLowering::LowerAsmOperandForConstraint?15; check: test_inlineasm_c_output_template116; check: //TEST baz17;@baz = internal global i32 0, align 418;define dso_local i32 @test_inlineasm_c_output_template1() {19; tail call void asm sideeffect "//TEST ${0:c}", "i"(ptr nonnull @baz)20; ret i32 4221;}22 23; Test that %n works with immediates24; CHECK-LABEL: test_inlineasm_c_output_template225; CHECK: //TEST -4226define dso_local i32 @test_inlineasm_c_output_template2() {27 tail call void asm sideeffect "//TEST ${0:n}", "i"(i32 42)28 ret i32 4229}30