roastduck opened a new pull request #5665:
URL: https://github.com/apache/incubator-tvm/pull/5665


   For `if (likely(x))`, `x` rather than `likely(x)` should be fed into the 
analyzer as a constraint.
   
   This changes helps `tir.transform.Simplify` simplify
   
   ```
   // attr [iter_var(threadIdx.x, , threadIdx.x)] thread_extent = 32
   // attr [iter_var(threadIdx.y, , threadIdx.y)] thread_extent = 32
   if (likely((((threadIdx.x*32) + threadIdx.y) < {n|n>=0}))) {
     if (likely((((threadIdx.x*32) + threadIdx.y) < {n|n>=0}))) {
       A[threadIdx.x] = C[((threadIdx.x*32) + threadIdx.y)]
     }
   }
   ```
   
   into
   
   ```
   // attr [iter_var(threadIdx.x, , threadIdx.x)] thread_extent = 32
   // attr [iter_var(threadIdx.y, , threadIdx.y)] thread_extent = 32
   if (likely((((threadIdx.x*32) + threadIdx.y) < {n|n>=0}))) {
     A[threadIdx.x] = C[((threadIdx.x*32) + threadIdx.y)]
   }
   ```
   
   I added this case as a new test.
   
   @tqchen 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to