File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
lib/Transforms/InstCombine
test/Transforms/InstCombine Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3412,6 +3412,10 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
3412
3412
!isPowerOf2_64 (RK.ArgValue ) || !isa<ConstantInt>(RK.IRArgValue ))
3413
3413
continue ;
3414
3414
3415
+ // Remove align 1 bundles; they don't add any useful information.
3416
+ if (RK.ArgValue == 1 )
3417
+ return CallBase::removeOperandBundle (II, OBU.getTagID ());
3418
+
3415
3419
// Don't try to remove align assumptions for pointers derived from
3416
3420
// arguments. We might lose information if the function gets inline and
3417
3421
// the align argument attribute disappears.
Original file line number Diff line number Diff line change @@ -249,8 +249,7 @@ define ptr @redundant_assume_align_8_via_asume(ptr %p) {
249
249
250
250
define ptr @assume_align_1 (ptr %p ) {
251
251
; CHECK-LABEL: @assume_align_1(
252
- ; CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(ptr [[P:%.*]], i32 1) ]
253
- ; CHECK-NEXT: call void @foo(ptr [[P]])
252
+ ; CHECK-NEXT: call void @foo(ptr [[P:%.*]])
254
253
; CHECK-NEXT: ret ptr [[P]]
255
254
;
256
255
call void @llvm.assume (i1 true ) [ "align" (ptr %p , i32 1 ) ]
You can’t perform that action at this time.
0 commit comments