On Thu, Mar 2, 2017 at 6:49 PM, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: >> >> It appears that the sparse-llvm code is storing the LLVM instruction >> for '%r2' in pseudo->priv. >> >> > store.64 %r2 -> 0[%arg1] > > Ah yes, it overwrite the correct value previously stored there (the > LLVMValueRef corresponding to %r2) with the return value of LLVMBuildStore(). > >> And then it using the value of the store instruction whenever it sees '%r2'? >> >> > load.64 %r18 <- 8[%r2] >> >> But here it fails because it needs to cast the LLVM store instruction >> to be a pointer to access 8[]? > > Yes, now anything using %r2 will go wrong. > > Removing the last line of output_op_store() (insn->target->priv = target;) > should fix this. In fact LLVMBuildStore() return a LLVMValueRef. Could this be the 'void' we seen? Luc -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html