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

Add VectorType to TypeAnalysis #857

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

rayegun
Copy link

@rayegun rayegun commented Sep 27, 2022

There's a note within about zero length VectorTypes. Seems to me that it is impossible by construction.

fixes #856

@rayegun rayegun changed the title add VectorType with note Add VectorType to TypeAnalysis with note Sep 27, 2022
@rayegun rayegun changed the title Add VectorType to TypeAnalysis with note Add VectorType to TypeAnalysis Sep 27, 2022
@@ -4254,6 +4254,24 @@ void TypeAnalyzer::visitCallInst(CallInst &call) {
llvm::errs() << *T << " - " << call << "\n";
llvm_unreachable("Unknown type for libm");
}
} else if (auto VT = dyn_cast<VectorType>(T)) {
// AFAICT there is no equivalent for VectorType?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the note.

However can you add a test?

See here for a sample (except just have it call the function you ran into with corresponding type signature): https://github.com/EnzymeAD/Enzyme/blob/main/enzyme/test/TypeAnalysis/cpuid.ll

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also in your case I think the issue is not in the argument (here). But in the return ( a few lines below on say 4280)

@wsmoses
Copy link
Member

wsmoses commented Oct 22, 2022

bump @Wimmerer

1 similar comment
@wsmoses
Copy link
Member

wsmoses commented Apr 11, 2023

bump @Wimmerer

@wsmoses
Copy link
Member

wsmoses commented Oct 22, 2023

bump @rayegun

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.

Unknown type for libm (__mulsc3)
2 participants