[PATCH] D130817: [X86][FP16] Fix vector_shuffle and lowering without f16c feature problems

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 30 02:18:36 PDT 2022


LuoYuanke added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:16083
 
-  if (NumV2Elements == 0) {
-    // Check for being able to broadcast a single element.
-    if (SDValue Broadcast = lowerShuffleAsBroadcast(DL, MVT::v8f16, V1, V2,
-                                                    Mask, Subtarget, DAG))
-      return Broadcast;
+  if (Subtarget.hasFP16()) {
+    if (NumV2Elements == 0) {
----------------
It seems the condition can be refined to hasAVX(), or we can add `hasAVX()` check in `lowerShuffleAsBroadcast`.
https://www.felixcloutier.com/x86/vbroadcast.html


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130817



More information about the llvm-commits mailing list