[all-commits] [llvm/llvm-project] f7d73a: [SelectionDAG] Don't scalarize vector fpround sour...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Mon Mar 8 14:38:21 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f7d73a6b9e8d6aad2039be1f6f42c9b3e012677f
      https://github.com/llvm/llvm-project/commit/f7d73a6b9e8d6aad2039be1f6f42c9b3e012677f
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2021-03-08 (Mon, 08 Mar 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
    M llvm/test/CodeGen/AArch64/arm64-vcvt_f.ll

  Log Message:
  -----------
  [SelectionDAG] Don't scalarize vector fpround sources that don't need it.

Similar to the workaround code in ScalarizeVecRes_UnaryOp, ScalarizeVecRes_SETCC
, ScalarizeVecRes_VSELECT, etc.

If we have a case like this:

```
define <1 x half> @func(<1 x float> %x) {
  %tmp = fptrunc <1 x float> %x to <1 x half>
  ret <1 x half> %tmp
}
```

On AArch64, the <1 x float> is legal. So, this will crash if we call
GetScalarizedVector on it.

Differential Revision: https://reviews.llvm.org/D98208




More information about the All-commits mailing list