[PATCH] D34923: [X86] Add comment string for broadcast loads from the constant pool.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 2 06:04:02 PDT 2017


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: lib/Target/X86/X86MCInstLower.cpp:1863-1867
+      switch (MI->getOpcode()) {
+      default: llvm_unreachable("Invalid opcode");
+      case X86::VBROADCASTSSrm:    NumElts = 4;  break;
+      case X86::VBROADCASTSSYrm:   NumElts = 8;  break;
+      case X86::VBROADCASTSSZ128m: NumElts = 4;  break;
----------------
craig.topper wrote:
> spatel wrote:
> > Could set NumElts above and then fall-through to avoid the switch-within-a-switch? Same for NumLanes below here.
> How do I fallthrough with different values for NumElts without using a goto?
Er, yes that would be difficult. :)
If there was a helper function for the remaining chunk of code, then we could pass NumElts to it as a param for each case and remove the switch-within-a-switch?


https://reviews.llvm.org/D34923





More information about the llvm-commits mailing list