The attached module causes a crash. It showed up when building OpenMP offload binaries for NVPTX.
Run with opt -passes="instcombine<max-iterations=1;no-verify-fixpoint>" -S < module.ll
module.zip
I'll merge a simple fix to unblock the build, but please take a look at this.