[PATCH] D64142: [SLP] try to create vector loads from bitcasted scalar pointers

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 10:37:31 PDT 2019


ABataev added inline comments.


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/load-bitcast-vec.ll:7
 ; CHECK-LABEL: @matching_scalar(
-; CHECK-NEXT:    [[BC:%.*]] = bitcast <4 x float>* [[P:%.*]] to float*
-; CHECK-NEXT:    [[R:%.*]] = load float, float* [[BC]], align 16
-; CHECK-NEXT:    ret float [[R]]
+; CHECK-NEXT:    [[TMP1:%.*]] = load <4 x float>, <4 x float>* [[P:%.*]], align 16
+; CHECK-NEXT:    [[TMP2:%.*]] = extractelement <4 x float> [[TMP1]], i32 0
----------------
Seems to me, it must be masked load rather than just load. Plus, what about the cost? This does not look like cost optimal.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64142/new/

https://reviews.llvm.org/D64142





More information about the llvm-commits mailing list