Revision https://reviews.llvm.org/D69384 added the option "-codegenprepare" to an invocation of opt, which then requires LLVM to have the expected target available for code generation. The ARM build bots do not compile this target as part of their build, causing this test to abort: "Trying to construct TargetPassConfig without a target machine. Scheduling a CodeGen pass without a target triple set?" Moving this test to the X86 subdirectory ensures that builds without the X86 backend skip this test.
I apologize for the constant early changes. I forget how phabricator catches and marks things as being referenced, so I was trying to get it to work.
This is a patch fix for D69384, which has broken ARM build bots. I present this as a band-aid since this feature and its test seems to be rather generic.
Shouldn't this be x86-registered-target? If I build the compiler with an x86-only backend, but not an apple triple as the default triple, I think this test gets marked as unsupported with your change instead of being run.