brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 7cde0c0 Raw
36 lines · plain
1; RUN: llc -verify-machineinstrs < %s2; REQUIRES: default_triple3 4; This used to cause a crash.  A standard load is converted to a pre-increment5; load.  Later the pre-increment load is combined with a subsequent SRL to6; produce a smaller load.  This transform invalidly created a standard load7; and propagated the produced value into uses of both produced values of the8; pre-increment load.  The result was a crash when attempting to process an9; add with a token-chain operand.10 11%struct.Info = type { i32, i32, ptr, ptr, ptr, [32 x ptr], i64, [32 x i64], i64, i64, i64, [32 x i64] }12%struct.S1847 = type { [12 x i8], [4 x i8], [8 x i8], [4 x i8], [8 x i8], [2 x i8], i8, [4 x i64], i8, [3 x i8], [4 x i8], i8, i16, [4 x %struct.anon.76], i16, i8, ptr }13%struct.anon.76 = type { i32 }14@info = common global %struct.Info zeroinitializer, align 815@fails = common global i32 0, align 416@a1847 = external global [5 x %struct.S1847]17define void @test1847() nounwind {18entry:19  %j = alloca i32, align 420  %0 = load i64, ptr getelementptr inbounds (%struct.Info, ptr @info, i32 0, i32 8), align 821  %1 = load i32, ptr @fails, align 422  %bf.load1 = load i96, ptr getelementptr inbounds ([5 x %struct.S1847], ptr @a1847, i32 0, i64 2), align 823  %bf.clear2 = and i96 %bf.load1, 30223145490365729367654324  %bf.set3 = or i96 %bf.clear2, -3838339477276447629692108825  store i96 %bf.set3, ptr getelementptr inbounds ([5 x %struct.S1847], ptr @a1847, i32 0, i64 2), align 826  %2 = load i32, ptr %j, align 427  %3 = load i32, ptr %j, align 428  %inc11 = add nsw i32 %3, 129  store i32 %inc11, ptr %j, align 430  %bf.load15 = load i96, ptr getelementptr inbounds ([5 x %struct.S1847], ptr @a1847, i32 0, i64 2), align 831  %bf.clear16 = and i96 %bf.load15, -1844674406941458432132  %bf.set17 = or i96 %bf.clear16, 1844674353254367232033  store i96 %bf.set17, ptr getelementptr inbounds ([5 x %struct.S1847], ptr @a1847, i32 0, i64 2), align 834  ret void35}36