【Question】One for loop is disappear after use call_llvm_intrin() in inner most loop

Hi,

I meet a really strange issue when I use call_llvm_intrin() function in my innermost loop.

From above code, we have three loops, from the IR, only two for loop, see below.

And report below error later,

TVMError: Not all Vars are passed in api_args: ‘k_chunk’ is not bound to any variables

So seems the third loop k_chunk is optimized by PASS or something other part, then in later stage it report k_chunk is not bound to any variables.

Any one have better suggestions?

In my desgin, the intrinsics need to be exectued in int64 format, but need to assign final result to int32, I think in lowering stage, some optimization code remove loop k_chunk due to certain resone.