Description
The new pass manager just crashes on CodeGenPrepare (and probably other IR codegen passes) if there is no target machine: https://godbolt.org/z/qoP6qTKG8
The old pass manager version does not crash, but it explicitly checks in the pass and fatal errors if the TargetMachine is null. The new PM could maybe guard this for all codegen passes?