[PATCH] D26149: [DAGCombiner] Match load by bytes idiom and fold it into a single load

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 15 06:47:23 PST 2016


RKSimon added inline comments.


================
Comment at: test/CodeGen/X86/load-combine.ll:213
+; (i64) p[0] | ((i64) p[1] << 8) | ((i64) p[2] << 16) | ((i64) p[3] << 24) | ((i64) p[4] << 32) | ((i64) p[5] << 40) | ((i64) p[6] << 48) | ((i64) p[7] << 56)
+define i64 @load_i64_by_i8(i64*) {
+; CHECK-LABEL: load_i64_by_i8:
----------------
What is preventing the 32-bit target doing anything here?


================
Comment at: test/CodeGen/X86/load-combine.ll:299
+; ((i64) p[0] << 56) | ((i64) p[1] << 48) | ((i64) p[2] << 40) | ((i64) p[3] << 32) | ((i64) p[4] << 24) | ((i64) p[5] << 16) | ((i64) p[6] << 8) | (i64) p[7]
+define i64 @load_i64_by_i8_bswap(i64*) {
+; CHECK-LABEL: load_i64_by_i8_bswap:
----------------
What is preventing the 32-bit target doing anything here?


https://reviews.llvm.org/D26149





More information about the llvm-commits mailing list