Bug 744

Summary: llvm expects predicate vectors <N x i1> to have same endianness as byte-endianness
Product: Libre-SOC's first SoC Reporter: Jacob Lifshay <programmerjake>
Component: SpecificationAssignee: Luke Kenneth Casson Leighton <lkcl>
Status: CONFIRMED ---    
Severity: enhancement CC: libre-soc-isa
Priority: ---    
Version: unspecified   
Hardware: Other   
OS: Linux   
NLnet milestone: --- total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0 parent task for budget allocation:
child tasks for budget allocation: The table of payments (in EUR) for this task; TOML format:

Description Jacob Lifshay 2021-11-10 01:45:43 GMT
llvm expects bit endianness to be identical to byte endianness:
https://github.com/llvm/llvm-project/blob/18334a1c1afe1b8a83c2a6108413bc48d80107df/llvm/lib/Analysis/ConstantFolding.cpp#L218

this will cause problems with big-endian and SV declaring integer predicates to be little-endian (lsb0)
Comment 1 Jacob Lifshay 2021-11-10 01:49:10 GMT
it may be easier for us to just switch predicate endian-ness on big-endian mode rather than add support to llvm for different bit/byte endianness which would require going through a lot of llvm's code.