This issue was introduced when reworking D75861. The bug isn't
actually hit with current unit tests because the contiguous loads/stores
infer the EltType and the MemEltType from the pointer and result, rather
than using the flags. But it will be needed for other intrinsics, such as
gather/scatter.
Details
Diff Detail
Event Timeline
Cheers for the fix @sdesmalen !
clang/include/clang/Basic/TargetBuiltins.h | ||
---|---|---|
188–197 | EltTypeShift and MemEltTypeShift are initialised twice in one constructor. If removing them from the member initialisation list throws a warning, perhaps you could use in-class initialisers? |
Patches with functional changes but without tests are a bit "suspicious". In this case, I see it might be tricky. You could argue that it should be incorporated in the patch that includes the tests, so we can see what's happening. But perhaps separating this out is cleaner, if the other patch is big. But can you at least make the next patch dependent on this one, so we know where this is used?
Yes you're right, the patch that I've made dependent needs this one to work properly.
Yes you're right, the patch that I've made dependent needs this one to work properly.
Ah ok, I may have missed that, will have a look
- Made Flags uint64_t instead of unsigned.
- Simplified encoding of flags in SveEmitter and moved encoding of properties into the Flags variable to the constructor of Intrinsic.
- Added (encoding of) MergeType as well.
clang/utils/TableGen/SveEmitter.cpp | ||
---|---|---|
229 | Should V now be an uint64_t? |
clang/utils/TableGen/SveEmitter.cpp | ||
---|---|---|
229 | Yes, good spot! |
clang/utils/TableGen/SveEmitter.cpp | ||
---|---|---|
240 | Shouldn't MT be uint64_t instead of unsigned? |
LGTM
This patch now implements a bit more than the original commit message would suggest. Could you please update? Thanks for working on this!
EltTypeShift and MemEltTypeShift are initialised twice in one constructor.
If removing them from the member initialisation list throws a warning, perhaps you could use in-class initialisers?