aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/FileSystemStatCache.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-11 00:36:57 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-11 00:36:57 +0000
commitb27041c50b5e09f18b3041e1c3dcb5b7a1ce1423 (patch)
tree4b9cac4cb47cca3e9308aabb194ebe24946712a9 /clang/lib/Basic/FileSystemStatCache.cpp
parentc4550d49676b199f37cfbdf845a723dbd0b10370 (diff)
downloadllvm-b27041c50b5e09f18b3041e1c3dcb5b7a1ce1423.zip
llvm-b27041c50b5e09f18b3041e1c3dcb5b7a1ce1423.tar.gz
llvm-b27041c50b5e09f18b3041e1c3dcb5b7a1ce1423.tar.bz2
Fix a miscompile in the DAG combiner. Previously, we would incorrectly
try to reduce the width of this load, and would end up transforming: (truncate (lshr (sextload i48 <ptr> as i64), 32) to i32) to (truncate (zextload i32 <ptr+4> as i64) to i32) We lost the sext attached to the load while building the narrower i32 load, and replaced it with a zext because lshr always zext's the results. Instead, bail out of this combine when there is a conflict between a sextload and a zext narrowing. The rest of the DAG combiner still optimize the code down to the proper single instruction: movswl 6(...),%eax Which is exactly what we wanted. Previously we read past the end *and* missed the sign extension: movl 6(...), %eax llvm-svn: 169802
Diffstat (limited to 'clang/lib/Basic/FileSystemStatCache.cpp')
0 files changed, 0 insertions, 0 deletions