Resolve the meaning of <N x i1>
| Bugzilla Link | 15131 |
| Resolution | DUPLICATE |
| Resolved on | Feb 28, 2013 23:16 |
| Version | trunk |
| OS | Linux |
| CC | @delena,@darkbuck |
Extended Description
LLVM has supported
Moreover, the current types code is inconsistent with the code generation. Getting the storage size of v4i1 will return 1 byte (because the 4 bits are rounded up to 1 byte), but if you run: @X = global <4 x i1> <i1 0, i1 1, i1 2, i1 3>
through llc (for x86_64 or anything else), you'll get something which looks like: X: .byte 0 # 0x0 .byte 1 # 0x1 .byte 0 # 0x0 .byte 1 # 0x1 .size X, 4
This should probably be changed to pack the bits together (to more naturally support mask registers on some targets).
FWIW, the default expansions of things like extract vector element in the DAG legalizer are also broken for vNi1 types.
mentioned in issue llvm/llvm-project#2156
patch to fix this bug only is submitted for review at http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130225/167323.html
BTW, make it duplication of llvm/llvm-project#2156 may not be proper as llvm/llvm-project#2156 covers much more code/design than this specific bug. If possible, llvm/llvm-project#2156 should a parent bug and this one should be its child bug.
*** This bug has been marked as a duplicate of bug llvm/llvm-project#2156 ***