Skip to content

Commit e803ef6

Browse files
committed
Add checks for generated SPIR-V.
1 parent 4a17c21 commit e803ef6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

llvm/test/CodeGen/SPIRV/llvm-intrinsics/fp-intrinsics.ll

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,23 @@ entry:
359359
ret void
360360
}
361361

362+
; CHECK: OpFunction
363+
; CHECK: %[[#d:]] = OpFunctionParameter %[[#]]
364+
; CHECK: %[[#fracPtr:]] = OpFunctionParameter %[[#]]
365+
; CHECK: %[[#integralPtr:]] = OpFunctionParameter %[[#]]
366+
; CHECK: %[[#entryBlock:]] = OpLabel
367+
; CHECK: %[[#varPtr:]] = OpVariable %[[#]] Function
368+
; CHECK: OpBranchConditional %[[#]] %[[#lor_lhs_falseBlock:]] %[[#if_thenBlock:]]
369+
; CHECK: %[[#lor_lhs_falseBlock]] = OpLabel
370+
; CHECK: OpBranchConditional %[[#]] %[[#if_endBlock:]] %[[#if_thenBlock]]
371+
; CHECK: %[[#if_thenBlock]] = OpLabel
372+
; CHECK: OpBranch %[[#returnBlock:]]
373+
; CHECK: %[[#if_endBlock]] = OpLabel
374+
; CHECK: %[[#frac:]] = OpExtInst %[[#var2]] %[[#extinst_id]] modf %[[#d]] %[[#varPtr]]
375+
; CHECK: %[[#integral:]] = OpLoad %[[#var2]] %[[#varPtr]]
376+
; CHECK: OpStore %[[#fracPtr]] %[[#frac]]
377+
; CHECK: OpStore %[[#integralPtr]] %[[#integral]]
378+
; CHECK: OpFunctionEnd
362379
define dso_local void @TestModf2(double noundef %d, ptr noundef %frac, ptr noundef %integral) {
363380
entry:
364381
%0 = load ptr, ptr %frac, align 8

0 commit comments

Comments
 (0)