Re: [RFC][PATCH. CSE. rs6000] Update CSE to handle involutory operations

2017-11-19 Thread Jeff Law
On 11/18/2017 10:47 AM, Peter Bergner wrote: > On 11/18/17 12:16 AM, Jeff Law wrote: >> You might wander a bit and see if/how cse handles other similar >> circumstances. For example (not (not (x)) (neg (neg x)) and (bswap >> (bswap (x)) > > I actually tried examples like that to see what CSE wou

Re: [RFC][PATCH. CSE. rs6000] Update CSE to handle involutory operations

2017-11-18 Thread Peter Bergner
On 11/18/17 12:16 AM, Jeff Law wrote: > You might wander a bit and see if/how cse handles other similar > circumstances. For example (not (not (x)) (neg (neg x)) and (bswap > (bswap (x)) I actually tried examples like that to see what CSE would do, but I could never come up with a test case, whe

Re: [RFC][PATCH. CSE. rs6000] Update CSE to handle involutory operations

2017-11-17 Thread Jeff Law
On 11/17/2017 10:30 PM, Peter Bergner wrote: > On POWER8 in little endian mode, the lxvd2x and stxvd2x instructions we use > for loading and storing vectors do not perform a byte swap as part of their > operation. This means we have to explicitly byte swap a vector before we > store to memory and

[RFC][PATCH. CSE. rs6000] Update CSE to handle involutory operations

2017-11-17 Thread Peter Bergner
On POWER8 in little endian mode, the lxvd2x and stxvd2x instructions we use for loading and storing vectors do not perform a byte swap as part of their operation. This means we have to explicitly byte swap a vector before we store to memory and byte swap it after we load it from memory. These swa