Fix print_element in polybench.h to be big-Endian friendly

In r241675, print_element was added to polybench.h so make printing out the
arrays faster. Unfortunately, it is not Endian neutral, and so the updated tests
were failing validation on big-Endian systems when using the reference outputs.

llvm-svn: 242000
diff --git a/SingleSource/Benchmarks/Polybench/utilities/polybench.h b/SingleSource/Benchmarks/Polybench/utilities/polybench.h
index e55bac1..91d6df3 100644
--- a/SingleSource/Benchmarks/Polybench/utilities/polybench.h
+++ b/SingleSource/Benchmarks/Polybench/utilities/polybench.h
@@ -619,6 +619,16 @@
 
   block.datum = el;
   /* each nibble as a char, within the printable range */
+#ifdef __BIG_ENDIAN__
+  *(out+pos+7) = (block.bytes[0]&0xF0>>4)+'0';
+  *(out+pos+6) = (block.bytes[0]&0x0F)   +'0';
+  *(out+pos+5) = (block.bytes[1]&0xF0>>4)+'0';
+  *(out+pos+4) = (block.bytes[1]&0x0F)   +'0';
+  *(out+pos+3) = (block.bytes[2]&0xF0>>4)+'0';
+  *(out+pos+2) = (block.bytes[2]&0x0F)   +'0';
+  *(out+pos+1) = (block.bytes[3]&0xF0>>4)+'0';
+  *(out+pos) =   (block.bytes[3]&0x0F)   +'0';
+#else
   *(out+pos)   = (block.bytes[0]&0xF0>>4)+'0';
   *(out+pos+1) = (block.bytes[0]&0x0F)   +'0';
   *(out+pos+2) = (block.bytes[1]&0xF0>>4)+'0';
@@ -627,6 +637,7 @@
   *(out+pos+5) = (block.bytes[2]&0x0F)   +'0';
   *(out+pos+6) = (block.bytes[3]&0xF0>>4)+'0';
   *(out+pos+7) = (block.bytes[3]&0x0F)   +'0';
+#endif
 }
 
 #endif /* !POLYBENCH_H */