1; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s 2 3; Test case adapted from PR40922. 4 5@a.b = internal global i32 0, align 4 6 7define i32 @a() { 8entry: 9 %call = tail call i32 bitcast (i32 (...)* @d to i32 ()*)() 10 %0 = load i32, i32* @a.b, align 4 11 %conv = zext i32 %0 to i64 12 %add = add nuw nsw i64 %conv, 6 13 %and = and i64 %add, 8589934575 14 %cmp = icmp ult i64 %and, %conv 15 br i1 %cmp, label %if.then, label %if.end 16 17if.then: ; preds = %entry 18 %call3 = tail call i32 bitcast (i32 (...)* @e to i32 ()*)() 19 br label %if.end 20 21if.end: ; preds = %if.then, %entry 22 store i32 %call, i32* @a.b, align 4 23 ret i32 undef 24} 25 26; CHECK-LABEL: @a 27; CHECK: li 5, 0 28; CHECK: mr 30, 3 29; CHECK: addic 6, 4, 6 30; CHECK: addze 5, 5 31; CHECK: rlwinm 6, 6, 0, 28, 26 32; CHECK: andi. 5, 5, 1 33 34declare i32 @d(...) 35 36declare i32 @e(...) 37