[PATCH] D102822: [Clang][CodeGen] Set the size of llvm.lifetime to unknown for scalable types.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 2 13:47:52 PDT 2021


craig.topper added inline comments.


================
Comment at: clang/test/CodeGen/RISCV/riscv-v-lifetime.cpp:3
+// REQUIRES: riscv-registered-target
+// RUN: %clang_cc1 -std=c++11 -triple riscv64 -target-feature +experimental-v \
+// RUN:   -emit-llvm -O1 -o - %s | FileCheck %s
----------------
Probably best to add -disable-llvm-passes so we don't run the optimizer.


================
Comment at: clang/test/CodeGen/RISCV/riscv-v-lifetime.cpp:8
+
+template <typename T>
+void Foo(T &&);
----------------
Are the templates needed? This was enough to fail for me

```
vint32m1_t Baz();                                                                                                                                                                                                               
                                                                                                                                                                                                                                
vint32m1_t Test() {                                                                                                                                                                                                             
  const vint32m1_t &a = Baz();                                                                                                                                                                                                  
  return a;                                                                                                                                                                                                                     
}
```

Or do the templates test additional code paths?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102822/new/

https://reviews.llvm.org/D102822



More information about the cfe-commits mailing list