I have already asked how to receive unoptimized IR. This way:
clang -S -emit-llvm -O3 -mllvm -disable-llvm-optzns memset.c -o memset.s
I have noticed, that in any case, when I use O1, O2, O3 and disable optimizations, I still get llvm intrinsics functions inserted.
when I put O0, I have no intrinsics, but have noopt attribute. Is there a way to receive purely unoptimizaed IR without any intrinsics?