Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

icx: IR output is not supported.

foxtran
New Contributor I
543 Views

Dear,

I have tried to get LLVM-IR from C front. I used standard clang flags, but, unfortunately, it does not work.

Here, the example:
```
$ icx megafile.c -O0 -S -emit-llvm
error: IR output is not supported.
1 error generated.
```

My icx version is the following:
$ icx --version
Intel(R) oneAPI DPC++/C++ Compiler 2024.0.0 (2024.0.0.20231017)
Target: x86_64-unknown-linux-gnu

Labels (1)
0 Kudos
1 Solution
NoorjahanSk_Intel
Moderator
484 Views

Hi,

 

Thanks for posting in Intel communities.

 

We have tried with a sample hello world code with the below commands and it successfully generated LLVM IR.

>>icx -emit-llvm -o llvm_ir.bc -c -flto  sample.c

NoorjahanSk_Intel_0-1701081639766.png

 

Please try the above command and if you still face any issues please provide us with a sample reproducer code, so that we can try it from our side.

 

Thanks & Regards,

Noorjahan.

 

View solution in original post

0 Kudos
3 Replies
NoorjahanSk_Intel
Moderator
485 Views

Hi,

 

Thanks for posting in Intel communities.

 

We have tried with a sample hello world code with the below commands and it successfully generated LLVM IR.

>>icx -emit-llvm -o llvm_ir.bc -c -flto  sample.c

NoorjahanSk_Intel_0-1701081639766.png

 

Please try the above command and if you still face any issues please provide us with a sample reproducer code, so that we can try it from our side.

 

Thanks & Regards,

Noorjahan.

 

0 Kudos
foxtran
New Contributor I
463 Views

Dear Noorjahan,

Thanks! I had problem is due to -S flag. With -emit-llvm -S I expected to receive LLVM bytecode in human-readable format.

It would be nice if llvm-dis will be provided together with Intel Compiler. I checked $CMPLR_ROOT/bin/compiler/ and I did not find it there.

Best regards,
Igor

0 Kudos
NoorjahanSk_Intel
Moderator
385 Views

Hi,

 

>>Thanks! I had problem is due to -S flag

Glad to know that your issue has been resolved.

 

>>It would be nice if llvm-dis will be provided together with Intel Compiler.

We have forwarded your feedback to the concerned development team. They are looking into your issue and we will get back to you soon.

 

Thanks & Regards,

Noorjahan.

0 Kudos
Reply