-
Notifications
You must be signed in to change notification settings - Fork 4
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
[Project] Backend Miscompilation: overwrited sp #159
Comments
또한 추가로 해당 코드를 컴파일하였을 때 vector instruction을 사용하지 않았음에도 vbcast나 vstore와 같은 instruction이 생성됩니다. vector move를 목적으로 사용된 constant 때문에 이 vector instruction들이 발생하는 것으로 추정되는데, 해당 vector instruction이 남아있는 것이 의도하신 동작인지 여쭙고자 합니다. EDIT: 관련해서 확인해보니 num_general_colors와 num_vector_colors 둘 중 하나만 최대 register 개수를 초과하더라도, 두 종류의 register 모두에 대해서 load & store pair을 생성하고 있는 것 같습니다. 이게 의도하신 동작인지 궁금합니다. |
@strikef 혹시 이 에러에 대해서는 별도의 처리가 필요하지 않을까요? |
추가로 제보하자면, matmul3에서 동일한 유형의 오류가 발생하고 있는 상황입니다. (matmul 함수의 entry block에 sub sp sp 가 존재합니다.) click to expand the full output
|
안녕하세요, 백엔드에서 miscompilation이 발생하는 것 같아 이를 제보하고자 합니다.
다음은 제가 임의로 작성한 c 코드입니다. 여기서
excessiveRegUse1
과excessiveRegUse2
는 backend에서 register 할당 과정에 stack memory를 사용하도록 의도하는 목적으로 설계하였습니다.해당 코드를 실행시키면 다음과 같은 출력이 나옵니다.
일부 상수가 잘못된 값을 출력함을 확인할 수 있습니다.
다음은 어셈블리 코드를 살펴보았을 때 문제가 되는 부분입니다.
sub sp sp 64에서 sp가 두 함수 모두 0이 되는데, 이게 의도하지 않은 동작으로 보입니다.
해당 문제를 확인해주셨으면 합니다. 감사합니다.
The text was updated successfully, but these errors were encountered: