1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=instcombine < %s | FileCheck %s
4 @A = external constant i32
7 ; https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14169
8 define void @ossfuzz_14169_test1(ptr %a0) {
9 ; CHECK-LABEL: @ossfuzz_14169_test1(
11 ; CHECK-NEXT: store ptr poison, ptr undef, align 8
12 ; CHECK-NEXT: ret void
15 %B = ptrtoint ptr @A to i64
16 %C = icmp sge i64 %B, 0
17 %X = select i1 %C, i712 0, i712 1
18 %B9 = lshr i712 %X, 146783911423364576743092537299333564210980159306769991919205685720763064069663027716481187399048043939495936
19 %G5 = getelementptr i64, ptr undef, i712 %B9
20 store ptr %G5, ptr undef
24 define void @ossfuzz_14169_test2(ptr %a0) {
25 ; CHECK-LABEL: @ossfuzz_14169_test2(
27 ; CHECK-NEXT: store ptr poison, ptr undef, align 8
28 ; CHECK-NEXT: ret void
31 %B = ptrtoint ptr @A to i64
32 %C = icmp sge i64 %B, 0
33 %X = select i1 %C, i712 0, i712 1
34 %B9 = shl i712 %X, 146783911423364576743092537299333564210980159306769991919205685720763064069663027716481187399048043939495936
35 %G5 = getelementptr i64, ptr undef, i712 %B9
36 store ptr %G5, ptr undef