<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/127994>127994</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
The result of updating through update_test_check.py is different from the result of bin/opt.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ParkHanbum
</td>
</tr>
</table>
<pre>
It's a phenomenon caused by the code I added. It doesn't happen in the original version.
This is a test updated through 'update_test_check.py'.
```
define <4 x i64> @x86_pblendvb_v8i32_v4i32(<4 x i64> %a, <4 x i64> %b, <4 x i64> %c, <4 x i64> %d) {
; CHECK-LABEL: @x86_pblendvb_v8i32_v4i32(
; CHECK-NEXT: [[C_BC:%.*]] = bitcast <4 x i64> [[C:%.*]] to <8 x i32>
; CHECK-NEXT: [[D_BC:%.*]] = bitcast <4 x i64> [[D:%.*]] to <8 x i32>
; CHECK-NEXT: [[CMP:%.*]] = icmp slt <8 x i32> [[C_BC]], [[D_BC]]
; CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i64> [[A:%.*]] to <8 x i32>
; CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i64> [[B:%.*]] to <8 x i32>
; CHECK-NEXT: [[TMP3:%.*]] = select <8 x i1> [[CMP]], <8 x i32> [[TMP1]], <8 x i32> [[TMP2]]
; CHECK-NEXT: [[RES:%.*]] = bitcast <8 x i32> [[TMP3]] to <4 x i64>
; CHECK-NEXT: ret <4 x i64> [[RES]]
;
%a.bc = bitcast <4 x i64> %a to <32 x i8>
%b.bc = bitcast <4 x i64> %b to <32 x i8>
%c.bc = bitcast <4 x i64> %c to <8 x i32>
%d.bc = bitcast <4 x i64> %d to <8 x i32>
%a.lo = shufflevector <32 x i8> %a.bc, <32 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
%b.lo = shufflevector <32 x i8> %b.bc, <32 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
%a.hi = shufflevector <32 x i8> %a.bc, <32 x i8> poison, <16 x i32> <i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
%b.hi = shufflevector <32 x i8> %b.bc, <32 x i8> poison, <16 x i32> <i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
%cmp = icmp slt <8 x i32> %c.bc, %d.bc
%sext = sext <8 x i1> %cmp to <8 x i32>
%sext.bc = bitcast <8 x i32> %sext to <32 x i8>
%sext.lo = shufflevector <32 x i8> %sext.bc, <32 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
%sext.hi = shufflevector <32 x i8> %sext.bc, <32 x i8> poison, <16 x i32> <i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
%sel.lo = tail call <16 x i8> @llvm.x86.sse41.pblendvb(<16 x i8> %a.lo, <16 x i8> %b.lo, <16 x i8> %sext.lo)
%sel.hi = tail call <16 x i8> @llvm.x86.sse41.pblendvb(<16 x i8> %a.hi, <16 x i8> %b.hi, <16 x i8> %sext.hi)
%concat = shufflevector <16 x i8> %sel.lo, <16 x i8> %sel.hi, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
%res = bitcast <32 x i8> %concat to <4 x i64>
ret <4 x i64> %res
}
```
It's an excerpt of only the changed parts here.
```
; CHECK-NEXT: [[CMP:%.*]] = icmp slt <8 x i32> [[C_BC]], [[D_BC]]
; CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i64> [[A:%.*]] to <8 x i32>
; CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i64> [[B:%.*]] to <8 x i32>
-; CHECK-NEXT: [[TMP3:%.*]] = select <8 x i1> [[CMP]], <8 x i32> [[TMP2]], <8 x i32> [[TMP1]]
+; CHECK-NEXT: [[TMP3:%.*]] = select <8 x i1> [[CMP]], <8 x i32> [[TMP1]], <8 x i32> [[TMP2]]
; CHECK-NEXT: [[RES:%.*]] = bitcast <8 x i32> [[TMP3]] to <4 x i64>
; CHECK-NEXT: ret <4 x i64> [[RES]]
```
The following is the result of executing the same command through 'bin/opt'.
```
[IC] Iteration limit #1 on x86_pblendvb_v8i32_v4i32 reached; stopping without verifying fixpoint
SROA function: x86_pblendvb_v8i32_v4i32
; ModuleID = 'p.ll'
source_filename = "p.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-unknown"
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
define <4 x i64> @x86_pblendvb_v8i32_v4i32(<4 x i64> %a, <4 x i64> %b, <4 x i64> %c, <4 x i64> %d) local_unnamed_addr #0 {
%c.bc = bitcast <4 x i64> %c to <8 x i32>
%d.bc = bitcast <4 x i64> %d to <8 x i32>
%1 = icmp slt <8 x i32> %c.bc, %d.bc
%2 = bitcast <4 x i64> %b to <8 x i32>
%3 = bitcast <4 x i64> %a to <8 x i32>
%4 = select <8 x i1> %1, <8 x i32> %2, <8 x i32> %3
%res = bitcast <8 x i32> %4 to <4 x i64>
ret <4 x i64> %res
}
```
The test updated to 'update_test_check.py' and the result Trasnformed to bin/opt differ as follows.
```update_test_check.py
; CHECK-NEXT: [[TMP1:%.*]] = bitcast <4 x i64> [[A:%.*]] to <8 x i32>
; CHECK-NEXT: [[TMP2:%.*]] = bitcast <4 x i64> [[B:%.*]] to <8 x i32>
; CHECK-NEXT: [[TMP3:%.*]] = select <8 x i1> [[CMP]], <8 x i32> [[TMP1]], <8 x i32> [[TMP2]]
```
```bin/opt
%2 = bitcast <4 x i64> %b to <8 x i32>
%3 = bitcast <4 x i64> %a to <8 x i32>
%4 = select <8 x i1> %1, <8 x i32> %2, <8 x i32> %3
```
Why does this happen?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsWVuP6jgS_jXmxQIldkLggYfQF01rp3dbc1rafUMmqRDvcezIdrrh36-cG5cONNM9Z9TnaCUkCtvlry6ucpVhxvCNBFigcInC2xGrbK704onp778xua6K0VqluwXy4geLSGQww2UOUhUglcQJqwykeL3DNgecqBTwA2ZpCukEP1icKjASkcjinJUlSMxlvVBpvuGSCfwC2nAlJ8iLkRc_59xg7iAsGIurMmUWUmxzrapNjhGJmqGVm14lOSTfJ-UOkajmn3rtx4tTyLgEjOhNgLeYTwNE7zAKvO1suirXAmT6sl69zDglq5eAU4LI7GQtCRkiN6c7kHA9OJoMjqaIzDGKlk44usQ3v93d_GP8e7y8-x3R-D1xDnn-efefZ8eCMa69tLxZLW8QjREJJ4jEKLxF4S1G9BavuU2YsaeyNExvOKxyC2duISWI3l0Gvf0I6O0nQW8enwYxeVKU2Ah7vNeheeq1tV_20jdjFwGfH5_8P61l_Ektnx-fyJ8GXX4elA6CGhCQ7C3rHxj28enArgOWr6333gpyjR_-uPv2nkWG9qZHptjb7ByYhmHjOvgDKZEX4zopTNbJJceQkLXQlLjhWQNd867f5V2f5U3e5U2GvF_zpu_ypmd52USo5kzkVZYJeIHEKn0sY2eX1uMHE6XiRsl23J8euIvecEqw56Yc4XcE6QjaEUFHhB0x7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