Skip to content

Commit ca428ff

Browse files
committed
fix: perform dynamic inttoptr in its own instruction
or we get the following error: llvm-as: adaptive_loops.ll:11:85: error: invalid use of function-local name call void @__quantum__qis__cnot__body(%Qubit* null, %Qubit* nonnull inttoptr (i64 %0 to %Qubit*)) ^
1 parent 37bed58 commit ca428ff

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

specification/under_development/profiles/Adaptive_Profile.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ entry:
253253
br label %loop_body
254254
loop_body: ; preds = %loop_body, %entry
255255
%0 = phi i64 [ 1, %entry ], [ %1, %loop_body ]
256-
call void @__quantum__qis__cnot__body(%Qubit* null, %Qubit* nonnull inttoptr (i64 %0 to %Qubit*))
256+
%qptr = inttoptr i64 %0 to %Qubit*
257+
call void @__quantum__qis__cnot__body(%Qubit* null, %Qubit* nonnull %qptr)
257258
%1 = add i64 %0, 1
258259
%2 = icmp sle i64 %1, 4
259260
br i1 %2, label %loop_body, label %loop_exit

0 commit comments

Comments
 (0)