-
Notifications
You must be signed in to change notification settings - Fork 160
Labels
IR differenceA difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen testsA difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen testsgood first issueGood for newcomersGood for newcomers
Description
Classic clang codegen sets the nsw
flag for the add and sub operations produced for inc, dec, and minus operators on signed integer operations. When lowering through CIR, this flag is not set.
For example:
int f(int b) {
return ++b;
}
Classic codegen produces:
%inc = add nsw i32 %0, 1
CIR codegen produces:
%5 = add i32 %4, 1
It's not clear to me whether the CIR should also have an attribute for this.
bcardosolopes
Metadata
Metadata
Assignees
Labels
IR differenceA difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen testsA difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen testsgood first issueGood for newcomersGood for newcomers