[PATCH] D20931: [X86] Reduce the width of multiplification when its operands are extended from i8 or i16

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 00:26:14 PDT 2016


eli.friedman added inline comments.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:26675
@@ -26467,3 +26674,3 @@
     MulAmt1 = 3;
     MulAmt2 = MulAmt / 3;
   }
----------------
Ah, I see what you mean.  That's how we end up in an awful mess with the following:

```
typedef short a __attribute((ext_vector_type(4)));
void g(a x);
a f(a x, a y, int c) { a z = x*y; if (c) g(z+x); return z; }
```

----

That doesn't explain why you need to explicitly legalize the inputs in the case where you split the nodes, though.


Repository:
  rL LLVM

http://reviews.llvm.org/D20931





More information about the llvm-commits mailing list