@@ -338,12 +338,10 @@ define i1 @test_xor_of_bittest_ne_ne(i8 %x, i8 %y) {
338338define i1 @test_xor_of_bittest_ne_ne_var_pow2 (i8 %x , i8 %y , i8 %shamt ) {
339339; CHECK-LABEL: @test_xor_of_bittest_ne_ne_var_pow2(
340340; CHECK-NEXT: [[POW2:%.*]] = shl nuw i8 1, [[SHAMT:%.*]]
341- ; CHECK-NEXT: [[TMP2:%.*]] = and i8 [[TMP1:%.*]], [[POW2]]
342- ; CHECK-NEXT: [[XOR:%.*]] = icmp ne i8 [[TMP2]], 0
343- ; CHECK-NEXT: [[MASK2:%.*]] = and i8 [[Y:%.*]], [[POW2]]
341+ ; CHECK-NEXT: [[Y:%.*]] = xor i8 [[X:%.*]], [[Y1:%.*]]
342+ ; CHECK-NEXT: [[MASK2:%.*]] = and i8 [[Y]], [[POW2]]
344343; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 [[MASK2]], 0
345- ; CHECK-NEXT: [[XOR1:%.*]] = xor i1 [[XOR]], [[CMP2]]
346- ; CHECK-NEXT: ret i1 [[XOR1]]
344+ ; CHECK-NEXT: ret i1 [[CMP2]]
347345;
348346 %pow2 = shl nuw i8 1 , %shamt
349347 %mask1 = and i8 %x , %pow2
@@ -357,13 +355,11 @@ define i1 @test_xor_of_bittest_ne_ne_var_pow2(i8 %x, i8 %y, i8 %shamt) {
357355define i1 @test_xor_of_bittest_ne_ne_var_pow2_or_zero (i8 %x , i8 %y , i8 %z ) {
358356; CHECK-LABEL: @test_xor_of_bittest_ne_ne_var_pow2_or_zero(
359357; CHECK-NEXT: [[NZ:%.*]] = sub i8 0, [[Z:%.*]]
360- ; CHECK-NEXT: [[POW2:%.*]] = and i8 [[Z]], [[NZ]]
361- ; CHECK-NEXT: [[TMP3:%.*]] = and i8 [[X:%.*]], [[POW2]]
362- ; CHECK-NEXT: [[XOR:%.*]] = icmp ne i8 [[TMP3]], 0
363- ; CHECK-NEXT: [[MASK2:%.*]] = and i8 [[Y:%.*]], [[POW2]]
358+ ; CHECK-NEXT: [[TMP1:%.*]] = xor i8 [[X:%.*]], [[Y:%.*]]
359+ ; CHECK-NEXT: [[TMP2:%.*]] = and i8 [[TMP1]], [[NZ]]
360+ ; CHECK-NEXT: [[MASK2:%.*]] = and i8 [[TMP2]], [[Z]]
364361; CHECK-NEXT: [[CMP2:%.*]] = icmp ne i8 [[MASK2]], 0
365- ; CHECK-NEXT: [[XOR1:%.*]] = xor i1 [[XOR]], [[CMP2]]
366- ; CHECK-NEXT: ret i1 [[XOR1]]
362+ ; CHECK-NEXT: ret i1 [[CMP2]]
367363;
368364 %nz = sub i8 0 , %z
369365 %pow2 = and i8 %z , %nz
0 commit comments