Skip to content

Optimize x * !x to 0 for vector #84608

Closed
@k-arrows

Description

@k-arrows

Consider the following test case from https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.dg/tree-ssa/pr114009.c

typedef int V __attribute__((vector_size (4 * sizeof (int))));

V qux (V x)
{
  return x * (x == 0);
}

Godbolt: https://godbolt.org/z/dfGacerv8
Alive2: https://alive2.llvm.org/ce/z/uijB4T

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions