[llvm] c54cbf8 - [InstCombine] Add test case for #74739. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 13:35:42 PST 2023


Author: Craig Topper
Date: 2023-12-07T13:35:28-08:00
New Revision: c54cbf82b865a266216475e9d82ab0c0a250b235

URL: https://github.com/llvm/llvm-project/commit/c54cbf82b865a266216475e9d82ab0c0a250b235
DIFF: https://github.com/llvm/llvm-project/commit/c54cbf82b865a266216475e9d82ab0c0a250b235.diff

LOG: [InstCombine] Add test case for #74739. NFC

Added: 
    

Modified: 
    llvm/test/Transforms/InstCombine/or.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/InstCombine/or.ll b/llvm/test/Transforms/InstCombine/or.ll
index fd415682b67f32..3dd6bb440575ff 100644
--- a/llvm/test/Transforms/InstCombine/or.ll
+++ b/llvm/test/Transforms/InstCombine/or.ll
@@ -1608,3 +1608,16 @@ define i8 @drop_disjoint(i8 %x) {
   %b = or disjoint i8 %a, 1
   ret i8 %b
 }
+
+; FIXME: We should drop disjoint here.
+define i32 @assoc_cast_assoc_disjoint(i16 %x) {
+; CHECK-LABEL: @assoc_cast_assoc_disjoint(
+; CHECK-NEXT:    [[B:%.*]] = zext i16 [[X:%.*]] to i32
+; CHECK-NEXT:    [[C:%.*]] = or disjoint i32 [[B]], 65537
+; CHECK-NEXT:    ret i32 [[C]]
+;
+  %a = or i16 %x, 1
+  %b = zext i16 %a to i32
+  %c = or disjoint i32 %b, 65536
+  ret i32 %c
+}


        


More information about the llvm-commits mailing list