[llvm] r293496 - [InstCombine] add 'exact' to lshr to show that it got dropped; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 08:38:49 PST 2017


Author: spatel
Date: Mon Jan 30 10:38:49 2017
New Revision: 293496

URL: http://llvm.org/viewvc/llvm-project?rev=293496&view=rev
Log:
[InstCombine] add 'exact' to lshr to show that it got dropped; NFC 

Modified:
    llvm/trunk/test/Transforms/InstCombine/shift.ll

Modified: llvm/trunk/test/Transforms/InstCombine/shift.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/shift.ll?rev=293496&r1=293495&r2=293496&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/shift.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/shift.ll Mon Jan 30 10:38:49 2017
@@ -933,6 +933,7 @@ define <2 x i32> @test51_splat_vec(<2 x
 }
 
 ; (X << C1) >>u C2  --> X >>u (C2-C1) & (-1 >> C2)
+; Also, check that exact is propagated.
 
 define i32 @test51_no_nuw(i32 %x) {
 ; CHECK-LABEL: @test51_no_nuw(
@@ -941,7 +942,7 @@ define i32 @test51_no_nuw(i32 %x) {
 ; CHECK-NEXT:    ret i32 [[B]]
 ;
   %A = shl i32 %x, 1
-  %B = lshr i32 %A, 3
+  %B = lshr exact i32 %A, 3
   ret i32 %B
 }
 




More information about the llvm-commits mailing list