llvm / llvm/llvm-project

Remove vp.reverse

Open
#172,961 6 comments 0 reactions 1 assignee Claimed by @lukel97 View on GitHub
llvm
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Currently, vp.reverse is only used for reverse accesses. Taking a reverse load as an example:
```llvm
vp.reverse(
vp.load(vec_end_ptr(addr, evl), true /* mask */, evl),
true /* mask */,
evl
)
```

Its semantics are equivalent to:
```llvm
vector.reverse(
vector.splice(
poison,
vp.load(vec_end_ptr(addr, evl), true /* mask */, evl),
evl
)
)
```

With this approach, we no longer need the vp.reverse intrinsic. Moreover, after the reverse operation is simplified away, optimizeMaskToEVL can still transform it into an reverse load/store with EVL tail folding.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.