This test is XFAIL'd on most arches, and seems too fragile to be run on non-X86.
Yes, you are correct, there is a default value form this variable which comes from config.guess. So I guess this means this test is sensitive to what the target triple is, because it's failing for me when I set the default triple to ppc64le-redhat-linux-gnu, but not when it uses the default triple of powerpc64le-unknown-linux-gnu.
Also, the test passes for me when LLVM is configured to use the default triple of powerpc64le-unknown-linux-gnu, but fails when I configure the default triple to be ppc64le-redhat-linux-gnu.
Hmmm. Possibly the longer term fix is for this test to
a) Not be in the 'Generic' directory, or
b) Become a MIR test instead of exercising instruction selection as part of the test too.
(Adding an XFail in the meantime seems fine to me, especially as powerpc64 is already known to have this issue).