Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hexagon] Optimize post-increment load and stores in loops. #82011

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

sgundapa
Copy link

This patch optimizes the post-increment instructions so that we can packetize them together.
v1 = phi(v0, v3')
v2,v3 = post_load v1, 4
v2',v3'= post_load v3, 4

This can be optimized in two ways

v1 = phi(v0, v3')
v2,v3' = post_load v1, 8
v2' = load v1, 4

This patch optimizes the post-increment instructions so that
we can packetize them together.
v1 = phi(v0, v3')
v2,v3  = post_load v1, 4
v2',v3'= post_load v3, 4

This can be optimized in two ways

v1 = phi(v0, v3')
v2,v3' = post_load v1, 8
v2' = load v1, 4
@sgundapa sgundapa merged commit 0e6a48c into llvm:main Feb 16, 2024
6 checks passed
@sgundapa sgundapa deleted the postinc branch February 16, 2024 22:48
@steven-johnson
Copy link

This has broken HVX Codegen in Halide; our tests now fail with

vsub(v*:*.h,v*:*.h)  Failed Opcode is : 2656 (V6_vL32b_pred_ai)
No offset range is defined for this opcode. Please define it in the above switch statement!
UNREACHABLE executed at /home/halidenightly/build_bot/worker/llvm-19-x86-64-linux/llvm-project/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp:2981!

(see e.g. https://buildbot.halide-lang.org/master/#/builders/118/builds/86/steps/12/logs/correctness_simd_op_check_hvx)

Please either roll back this change ASAP or offer a fix-forward as this is blocking Halide from passing our tests.

@sgundapa
Copy link
Author

I will take a look and fix it.

krasimirgg added a commit that referenced this pull request Feb 20, 2024
…82011)"

This reverts commit 0e6a48c.

Temporary revert as it causes bad codegen: #82011 (comment)
@sgundapa
Copy link
Author

I am currently working on a fix

@sgundapa
Copy link
Author

Fix undr review here: #82386

@sgundapa sgundapa restored the postinc branch February 20, 2024 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants