1 ; RUN: %lli -O0 %s 2 3 ; This test checks that common symbols have been allocated addresses honouring 4 ; the alignment requirement. 5 6 @CS1 = common global i32 0, align 16 7 @CS2 = common global i8 0, align 1 8 @CS3 = common global i32 0, align 16 9 10 define i32 @main() nounwind { 11 entry: 12 %retval = alloca i32, align 4 13 %ptr = alloca i32, align 4 14 store i32 0, i32* %retval 15 store i32 ptrtoint (i32* @CS3 to i32), i32* %ptr, align 4 16 %0 = load i32, i32* %ptr, align 4 17 %and = and i32 %0, 15 18 %tobool = icmp ne i32 %and, 0 19 br i1 %tobool, label %if.then, label %if.else 20 21 if.then: ; preds = %entry 22 store i32 1, i32* %retval 23 br label %return 24 25 if.else: ; preds = %entry 26 store i32 0, i32* %retval 27 br label %return 28 29 return: ; preds = %if.else, %if.then 30 %1 = load i32, i32* %retval 31 ret i32 %1 32 } 33