This patch also adds the enum sv_prfop for the prefetch operation specifier
and checks to ensure the passed enum values are valid.
Details
Diff Detail
Event Timeline
LGTM with a couple minor comments.
| clang/lib/CodeGen/CGBuiltin.cpp | ||
|---|---|---|
| 7727 | It seems sort of silly to emit a no-op bitcast+gep+bitcast in the Ops.size() <= 3 case, but I guess it doesn't matter much. | |
| clang/test/CodeGen/aarch64-sve-intrinsics/negative/acle_sve_prfb.c | ||
| 23 | Maybe worth adding a negative test for svprfb_vnum? | |
- Don't emit bitcast+gep+bitcast when offset is 0.
- Added negative tests for _vnum cases.
| clang/lib/CodeGen/CGBuiltin.cpp | ||
|---|---|---|
| 7727 | You're right that was a bit silly. I've changed it now. | |
| clang/test/CodeGen/aarch64-sve-intrinsics/negative/acle_sve_prfb.c | ||
| 23 | Yes good catch I've added them. I'm not necessarily sure we also need to add them for all the gather variants as well. I think just having tests where the position of the prefetch specifier is different should be sufficient. | |
LGTM
| clang/test/CodeGen/aarch64-sve-intrinsics/negative/acle_sve_prfb.c | ||
|---|---|---|
| 23 | Yes, that seems fine. | |
It seems sort of silly to emit a no-op bitcast+gep+bitcast in the Ops.size() <= 3 case, but I guess it doesn't matter much.