Brx.idx without writing ptx

Is it possible to write a cuda c program that when compiled uses brx.idx? I want to compare brx.idx with bra implementations for a large switch statement.

How to translate switch() statements is at the discretion of compilers, and many different idioms can be used. Since heuristics are involved, it is usually not possible to force the choice of a particular idiom, and so it is with the CUDA compiler. At best one could arrive at a brittle situation where, as an implementation artifact for one particular compiler version and one particular target architecture, the desired instruction happens to be generated.

Without knowledge of the heuristics I played around with switch() statements a bit to see whether I could entice the compiler to generate brx.idx, without success. Note also that PTX is an intermediate representation that is further compiled into SASS (machine code) by the optimizing compiler ptxas, and there is probably no guarantee that a brx.idx at PTX level gets compiled into an equivalent indirect branch construct at the machine level.