-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIR] [CodeGen] Remove NYI in buildPointerWithAlignment (#949)
See the test for the reproducer. It would crash due the NYI. See https://github.com/llvm/llvm-project/blob/327124ece7d59de56ca0f9faa2cd82af68c011b9/clang/lib/CodeGen/CGExpr.cpp#L1295-L1373, I found we've implemented all the cases in CGExpr.cpp. IIUC, I think we can remove the NYI.
- Loading branch information
1 parent
e9ccae7
commit 1c1448a
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s | ||
|
||
void f(void); | ||
|
||
void test_call_lvalue_cast() { | ||
(*(void (*)(int))f)(42); | ||
} | ||
|
||
// CHECK: cir.func {{.*}}@test_call_lvalue_cast() | ||
// CHECK: [[F:%.+]] = cir.get_global @f | ||
// CHECK: [[CASTED:%.+]] = cir.cast(bitcast, [[F]] | ||
// CHECK: [[CONST:%.+]] = cir.const #cir.int<42> | ||
// CHECK: cir.call [[CASTED]]([[CONST]]) |