Reputation: 571
I get the error LLVM ERROR: Cannot select: 0x5644a6291a10: f32 = Constant<1036831949>
somewhere inside:
%a2 = load float, float* %a
%a3 = load float, float* %a
%cmp = fcmp one float %a3, 0.000000e+00
%not = xor i1 %cmp, true
%convert = zext i1 %not to i32
%conv = sitofp i32 %convert to float
%cmp2 = or float %conv, %a2
store float %cmp2, float* %a
Is there a possible type mismatch occurring here? I have encountered this error before, but in the context of a mismatch of types. Not sure what is wrong here, though.
Upvotes: 0
Views: 897
Reputation: 571
Found the issue. %cmp2 = or float %conv, %a2
is invalid because or
only takes int types.
Tip to other newbies, try running llc myfile.llvm
to find issues in your LLVM IR.
Upvotes: 2