[cfe-users] How to make LLVM IR (SHIFT) in Clang to support complex data type

2018-08-21 Thread Zhiguo Ge via cfe-users
Hi, All

I want IR in Clang to such as SHIFT can support complex number.
I tried to write the following code:
   complex data1;
   complex data2 = data1 >> 4;
The Clang compiler said invalid operands in binary instructions.
I guess Clang do the data type check and report the error.

Can anyone help to explain how to make Clang support complex number for
SHIFT IR?

Thanks a lot!
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] How to make LLVM IR (SHIFT) in Clang to support complex data type

2018-08-21 Thread rsherry8 via cfe-users
In this case, does the class complex support the shift operator? I 
suspect it does not. If it does then I suspect you have found a bug in 
Clang.


I am wondering why you need compiler support here. Could you not just 
add a shift operator to the class complex?


Bob
On 8/21/2018 12:16 PM, Zhiguo Ge via cfe-users wrote:

Hi, All

I want IR in Clang to such as SHIFT can support complex number.
I tried to write the following code:
   complex data1;
   complex data2 = data1 >> 4;
The Clang compiler said invalid operands in binary instructions.
I guess Clang do the data type check and report the error.

Can anyone help to explain how to make Clang support complex number 
for SHIFT IR?


Thanks a lot!


___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users