[all-commits] [llvm/llvm-project] 940f89: [InstCombine] Do not modify GEP in place
Nikita Popov via All-commits
all-commits at lists.llvm.org
Fri Sep 13 01:05:05 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 940f89255e4a3982d94dad57837e8e658092af78
https://github.com/llvm/llvm-project/commit/940f89255e4a3982d94dad57837e8e658092af78
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-09-13 (Fri, 13 Sep 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/test/Transforms/InstCombine/getelementptr.ll
Log Message:
-----------
[InstCombine] Do not modify GEP in place
This was modifying the GEP in place, with code to adjust the
inbounds flag. This was correct at the time, but now fails to
account for other GEP flags like nuw, leading to miscompilations.
Remove the special case, and always create a new GEP instruction.
Logic for preserving nuw in the cases where it is valid will be
added in a followup patch.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list