[llvm] [EarlyCSE] De-Duplicate callsites with differing attrs (PR #110929)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 22:22:07 PDT 2024
================
@@ -0,0 +1,125 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals all --version 5
+; RUN: opt -S -passes=early-cse < %s | FileCheck %s
+
+declare i8 @baz(i8, i8) readnone
+declare i8 @buz(i8, i8)
+define i8 @same_parent_combine_diff_attrs(i8 %x, i8 %y) {
+; CHECK-LABEL: define i8 @same_parent_combine_diff_attrs(
+; CHECK-SAME: i8 [[X:%.*]], i8 [[Y:%.*]]) {
+; CHECK-NEXT: [[C1:%.*]] = call i8 @baz(i8 [[X]], i8 noundef [[Y]])
+; CHECK-NEXT: [[R:%.*]] = call i8 @buz(i8 [[C1]], i8 [[C1]])
+; CHECK-NEXT: ret i8 [[R]]
+;
+ %c1 = call i8 @baz(i8 %x, i8 noundef %y)
+ %c0 = call i8 @baz(i8 noundef %x, i8 noundef %y)
----------------
goldsteinn wrote:
will do
https://github.com/llvm/llvm-project/pull/110929
More information about the llvm-commits
mailing list