Commit 25b269e
authored
Lower neon_vmaxvq_u8,neon_vmaxvq_s8, neon_vmaxv_u8 and neon_vmaxvq_s8 (#1265)
[Neon
definiton](https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:@navigationhierarchiessimdisa=[Neon]&q=vmaxv_s8)
[OG
implementation](https://github.com/llvm/clangir/blob/04d7dcfb2582753f3eccbf01ec900d60297cbf4b/clang/lib/CodeGen/CGBuiltin.cpp#L13202)
Implementation in this PR is different from OG as
1. avoided code duplication by extracting out the common pattern
2. avoided using i32 as return type of the intrinsic call, so eliminated
the need for casting result of the intrinsic call. This way of OG's
implementation is quite unnecessary IMHO, this is MAX, not ADD or MUL.
After all, using the expected type as return type of intrinsic call
produces [the same ASM code](https://godbolt.org/z/3nKG7fxPb).1 parent 294eae2 commit 25b269e
File tree
2 files changed
+76
-4
lines changed- clang
- lib/CIR/CodeGen
- test/CIR/CodeGen/AArch64
2 files changed
+76
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2351 | 2351 | | |
2352 | 2352 | | |
2353 | 2353 | | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
| 2363 | + | |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
2354 | 2374 | | |
2355 | 2375 | | |
2356 | 2376 | | |
| |||
4269 | 4289 | | |
4270 | 4290 | | |
4271 | 4291 | | |
4272 | | - | |
| 4292 | + | |
| 4293 | + | |
4273 | 4294 | | |
4274 | 4295 | | |
4275 | 4296 | | |
4276 | 4297 | | |
4277 | 4298 | | |
4278 | | - | |
| 4299 | + | |
| 4300 | + | |
4279 | 4301 | | |
4280 | 4302 | | |
4281 | 4303 | | |
4282 | 4304 | | |
4283 | 4305 | | |
4284 | | - | |
| 4306 | + | |
| 4307 | + | |
4285 | 4308 | | |
4286 | 4309 | | |
4287 | 4310 | | |
4288 | 4311 | | |
4289 | 4312 | | |
4290 | | - | |
| 4313 | + | |
| 4314 | + | |
4291 | 4315 | | |
4292 | 4316 | | |
4293 | 4317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1751 | 1751 | | |
1752 | 1752 | | |
1753 | 1753 | | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
0 commit comments