tree-optimization/113126 - vector extension compare optimization
commit897b95a12b7fe549ec2cb8ef3a3f0e4fbabf9737
authorRichard Biener <rguenther@suse.de>
Thu, 11 Jan 2024 11:02:43 +0000 (11 12:02 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 11 Jan 2024 14:08:02 +0000 (11 15:08 +0100)
tree34ff55139b9f706253c684745d9d954e4abf0e3c
parent05e8ef2a05b477589cae25af3311bad0f68a90fe
tree-optimization/113126 - vector extension compare optimization

The following makes sure the resulting boolean type is the same
when eliding a float extension.

PR tree-optimization/113126
* match.pd ((double)float CMP (double)float -> float CMP float):
Make sure the boolean type is the same.
* fold-const.cc (fold_binary_loc): Likewise.

* gcc.dg/torture/pr113126.c: New testcase.
gcc/fold-const.cc
gcc/match.pd
gcc/testsuite/gcc.dg/torture/pr113126.c [new file with mode: 0644]