-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"constexprAnything related to constant evaluationAnything related to constant evaluation
Description
Providing __builtin_elementwise_fshl
/ __builtin_elementwise_fshr
helper builtins would allow us to represent both integer rotates and funnel/double shift patterns on scalar and vector types.
LLVM represents these as:
fshl(X,Y,Z): (X << (Z % BW)) | (Y >> (BW - (Z % BW)))
fshr(X,Y,Z): (X << (BW - (Z % BW))) | (Y >> (Z % BW))
X and Y have to be same type (and is the return type as well). technically Z (the shift amount) type doesn't have to match, but should be able to represent the full (modulo) shift amount range.
Metadata
Metadata
Assignees
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"constexprAnything related to constant evaluationAnything related to constant evaluation