1; RUN: opt < %s -constprop -S | FileCheck %s 2 3; CHECK-LABEL: shift_undef_64 4define void @shift_undef_64(i64* %p) { 5 %r1 = lshr i64 -1, 4294967296 ; 2^32 6 ; CHECK: store i64 undef 7 store i64 %r1, i64* %p 8 9 %r2 = ashr i64 -1, 4294967297 ; 2^32 + 1 10 ; CHECK: store i64 undef 11 store i64 %r2, i64* %p 12 13 %r3 = shl i64 -1, 4294967298 ; 2^32 + 2 14 ; CHECK: store i64 undef 15 store i64 %r3, i64* %p 16 17 ret void 18} 19 20; CHECK-LABEL: shift_undef_65 21define void @shift_undef_65(i65* %p) { 22 %r1 = lshr i65 2, 18446744073709551617 23 ; CHECK: store i65 undef 24 store i65 %r1, i65* %p 25 26 %r2 = ashr i65 4, 18446744073709551617 27 ; CHECK: store i65 undef 28 store i65 %r2, i65* %p 29 30 %r3 = shl i65 1, 18446744073709551617 31 ; CHECK: store i65 undef 32 store i65 %r3, i65* %p 33 34 ret void 35} 36 37; CHECK-LABEL: shift_undef_256 38define void @shift_undef_256(i256* %p) { 39 %r1 = lshr i256 2, 18446744073709551617 40 ; CHECK: store i256 undef 41 store i256 %r1, i256* %p 42 43 %r2 = ashr i256 4, 18446744073709551618 44 ; CHECK: store i256 undef 45 store i256 %r2, i256* %p 46 47 %r3 = shl i256 1, 18446744073709551619 48 ; CHECK: store i256 undef 49 store i256 %r3, i256* %p 50 51 ret void 52} 53 54; CHECK-LABEL: shift_undef_511 55define void @shift_undef_511(i511* %p) { 56 %r1 = lshr i511 -1, 1208925819614629174706276 ; 2^80 + 100 57 ; CHECK: store i511 undef 58 store i511 %r1, i511* %p 59 60 %r2 = ashr i511 -2, 1208925819614629174706200 61 ; CHECK: store i511 undef 62 store i511 %r2, i511* %p 63 64 %r3 = shl i511 -3, 1208925819614629174706180 65 ; CHECK: store i511 undef 66 store i511 %r3, i511* %p 67 68 ret void 69} 70