Given the following C code:
#include <stdint.h>
uint32_t test20(uint8_t var0) { return var0 & 1 | var0 & 1; }
LLVM for some reason (?) decides to compile it to:
; Function Attrs: nounwind uwtable
define dso_local i32 @test20(i8 noundef zeroext %var0) #0 {
entry:
%0 = and i8 %var0, 1
%trunc = icmp ne i8 %0, 0
%rev = call i1 @llvm.bitreverse.i1(i1 %trunc)
%or = zext i1 %rev to i32
ret i32 %or
}
The intrinsic (which I think should be a noop?) is unimplemented and therefore fails the MLIR import
Given the following C code:
LLVM for some reason (?) decides to compile it to:
The intrinsic (which I think should be a noop?) is unimplemented and therefore fails the MLIR import